What are the differences, perhaps in context, between the following expressions?
Was ist passiert?
Was ist geschehen?
Was ist aufgetreten?
Regarding their overlap in sense, both words passieren and geschehen basically mean to happen. Another common translation is to occur.
Actually, it's quite hard to find an example where you cannot use both words but sometimes there's a tendency to one of them.
A couple of examples. In each example you can use both words. Though, I omitted the word which is less often in use for the specific example:
Here a few sayings where I would use geschehen only:
As mentioned in comments there are a lot of words which share the meaning. Which words fit best depends on context. Vorfallen, ereignen and sich zutragen, for instance, can be used in context of an accident.
The third word in question, however, is quite different. Auftreten can be translated as to occur as well but it's meaning is rather in the sense of to appear.
The question Was ist aufgetreten is not very idiomatic but might be found in a 'recipe' how to approach someone/something appropriately. For instance, if you'd ask a question on Stack Overflow about an error this particular question means something along 'What happened? Did you get a blue screen? Did your system freeze? What was the actual error message?'.
Aside about the word passieren: In other context, it means to pass (in the sense of to move past), to negotiate, to traverse as in
and in cooking it means to pass through a sieve, e.g. passierte Tomaten, but you'll rarely encounter this verb usage if you're not a cook.