When someone asks you a yes or no question, and the answer is very obvious, you can answer with "Are you kidding?":
A: Claire, will you marry me?
B: Are you kidding? Of course I will!
To "kid" someone means to make a kind of joke. So when you ask "Are you kidding?" it kind of means "Is it a joke that you're asking me this question? You should already know the answer!"
This phrase usually sounds friendly and positive.