The word どうして is an interrogative used to ask "why" or "for what reason" something happens. It is one of the most common ways to inquire about reasons or motives in Japanese. It can be used in both formal and informal speech.
It is slightly softer and more conversational than なぜ (a more formal version of "why"). In informal settings, it can carry a nuance of curiosity or surprise. For a softer or more casual tone, なんで can be used instead, but it is more colloquial.
Responses to どうして often end with ~だから (because ~):