What are the possible uses for だって?
It can mean "but" (similar to でも):
A: 学校に行きなさい！ (Go to school!)
B: だって頭痛いんだもん！ (But, my head hurts!)
This is often used by children, and can come across as cute or childish.
It can mean "even" (again, similar to でも):
頑張れば君だってできるよ！ (If you work hard even you can do it!)
It can mean the same as だと (or more generally, と becomes って)
彼のことが好きだって気づいた (I realised that I like him)
This use is conversational.
From Handbook of Japanese Grammar, Masahiro Tanimori:
INFORMAL PARTICLE OR CONJUNCTION (usually used by women and children) MEANING: but, because, also, even
At the beginning of a sentence
(in answer to a question)
"Ikitakunai no?" "Datte tsukarete iru n da mono."
"You don't want to go?" "Because I'm tired."
(in reply to an imperative)
"Mou neru jikan desu yo." "Datte nemuku nai n da mono."
"It's time you went to bed." "But I'm not sleepy."
Kanemochi datte fukou-na toki mo aru.
Even rich people are unhappy sometimes.
"Anna koto wa iya da." "Watashi datte iya da."
I hate such things. I do, too.
Used with interrogative pronoun (dare, nan, and doko + datte mean everybody, everything and everywhere, respectively)
Dare datte sore ni wa okorimasu.
Everybody gets angry at that.
Kare wa supootsu nara nan datte dekimasu.
If it's sports, he can play everything.
The above だって basically is a conversational version of でも.
There is another だって simply consisting of the quotative って applied to a 〜だ copula clause. For example, if someone said something ending in だ or です, then this can be used for relaying what was said.
Keikun won't return my pen. He says it's his.
けいくん probably said something like 「返さない。俺のペンだよ。」 and that is being relayed. This だって can be used to ask a question:
A:先生から電話が来たよ。Got a call from the sensei (teacher, doctor, ...).
B:えぇ。何だって。Huh? What'd he say?
Several answers above attempt to make the distinction between だって as a contraction of the copula だ and the quotation particle と, and だって as meaning “because” or “even” or “but”. However, ALL of the various uses of だって can be traced to a simple contraction of the copula だ and the quotation particle と.
This video does an excellent job of explaining how だって can have all these meanings and why if you understand that it’s simply the copula plus the とparticle, they all make sense. https://youtu.be/kO89HzRQygQ
As one example, When だって is used on its own at the beginning of a sentence, it usually means BUT because it takes what was previously said (or supposedly said) by someone else, it wraps all of what they said up with a だ, and then attributes that statement to the other person with the と particle. The words that then follow だって are a contrastive statement. So it’s like the person using だって is saying “you said this, and now here is my contrastive statement”. So there is an implication of BUT. “You said this [だって] BUT here is my contrastive statement.”
A similar analysis can be made to get to how it means “even” as in わたしだって. That’s usually followed by a statement of your own ability (“私だって出来る). But you can literally translate the わたしだって portion as “say it is me” which is easily understandable as “EVEN me”. So the whole sentence is “Saying it is me, I can do it” or “EVEN me, I can do it”.
*Note that the video I linked to may strike you as strange due to its format using an anime instructor. But do not be put off! The teacher behind it provides a wealth of information on Japanese grammar and how it really works that is never explained elsewhere. Her videos have really helped me to understand the WHY behind Japanese grammar points rather than just the translation. It’s a shame she doesn’t have more followers.