In the UK, the term "nonce" is a slang word that is primarily used to refer to a person who is a sex offender, especially one who commits crimes involving children, such as a pedophile. It is a derogatory and highly offensive term used in prison slang and British colloquial language to label someone accused or convicted of sexual offenses against children. The term has also been used more generally as an insult meaning a worthless or stupid person, but its most recognized and serious meaning in the UK is related to sexual offenses involving children.
There is also a completely different meaning of "nonce" in other contexts, such as cryptography, where it means a number or value used only once, and in linguistics, where "nonce word" refers to a word coined for a particular occasion. However, these meanings are separate from the UK slang usage.