It's a more informal and emphatic way of saying no. It can also express:
* Disagreement: "Do you want to go to the movies?" "Nope."
* Refusal: "Can I borrow your car?" "Nope."
* Disinterest: "Want to come to the party?" "Nope."
It's often used in casual conversation, but can be used in more formal settings as well, depending on the context and the speaker's relationship with the listener.