DATTE is a conjunction and a contraction of だと言って.
It can be used as an inquiry: 地震だって? - An earthquake, you say? (in response to someone mentioning earthquakes). This can be used to show express shock or surprise, or sometimes displeasure. It's said with a rising tone. DESUTTE is a formal equivalent, used with people of a lower status or with someone you're close to.
It can be used like でも (even ~): 先生だって間違うことはある - There are times when even teachers make mistakes. Informal, spoken.
It can be used like DEMO (But) and give a reason, even if not asked: だって、牛乳嫌いだもん - But, I don't like milk... (child in response to being told to drink their milk). Informal, spoke.