Use the word "whatever" when you're annoyed by what someone has said but don't want to continue arguing with them. It sort of means "I don't agree with you, but I'm not going to talk about it any more." For example:
A: You were so rude to me.
B: No I wasn't!
A: Yes you were. How can you possibly deny it?
This phrase can be pretty rude depending on your tone of voice and who you're saying it to.