To nick something or someone means to cut them slightly with a sharp object.
While cutting the carrots, the cook nicked his finger with the edge of his knife.
Example picture