What does ‘To nick/nicked’ mean?

Depending on how it is used, “Nick” can mean one of two things (three including the name). The most commonly used form is as an alternative to “steal”. As in  “I accidentally nicked this pen from work.” Another way it can be used is as a term for being arrested.

For example, ‘I got nicked a year ago.’

What I like about this term and its two/three usages is that the following sentence, “Nick got nicked for nicking something” makes grammatical sense.