Use this expression to talk about a person who causes problems for you. For example, use it on a person who asks a lot of favors from you.
There are some other related expressions that people also use:
You're a real pain in the ass.
You're a real pain in the you-know-what.
"Pain in the ass" is more rude than "pain in the neck". But it expresses the feeling of frustration more clearly. "Pain in the you-know-what" is a way of saying "pain in the ass" without using the rude word "ass".
When you say that someone is "a real" pain in the neck, it just means that they're really annoying.