A narc is an (especially undercover) police officer investigating crime involving illegal narcotics and other illegal drugs.
According to the Oxford English Dictionary, narc is a contraction of narcotic and refers to a narcotics enforcement officer. It appears to have become confused with, and partially fallen together with, the older term nark (which itself may have influenced the formation and meaning of narc), possibly derived from the (Anglo-)Romany-word for nose. In the meaning of a police informant, this older term has been used at least since the nineteenth century (the OED has citations from 1859; see definition 2a).
Today, narc usually refers to a narcotics agent or police informant who provides information to the police about drug offenders. It is more often used to refer to undercover agents than police officers. Some drug offenders, once caught, turn into informants as part of an agreement with the police to avoid charges.
It is also sometimes used in popular culture to refer to someone who is against people consuming drugs of their own free will.
In season 2, episode 20 (Drug testing) of the popular sitcom The Office, Michael Scott mocks Dwight Shrute by calling him a nark. Kevin was the only person in the office to laugh at this, and Dwight actually took it as a compliment.
A sub-category is "poison nark", an apparent informer who is actually providing false or highly selective information.