And they often mix these together! Ordered by popularity they are:
O que aconteceu?
You'll often hear it said like this:
In either case, Brazilians are very likely to swallow the "o" as well as adding an extra "que". The result can sound like: que que aconteceu.
This sentence actually ranks at #215 on the list of most frequently used Portuguese phrases (download the list here). It's something you need to be able to express easily. There are other - very popular - other ways of saying the same thing: What happened? ...
O que foi?
The foi comes from the verb SER. You are literally saying: What was. In this instance, Brazilians are likely to swallow the "o" or the entire "o que"!
This is, of course, SER is the preterite perfect (the simple past) tense -- the same conjugation as the verb IR. I often don't really know what verb I'm conjugating as I think of the past tense of these as the same. For example, Como foi a reunião? - translates as: How did the meeting GO? just as well.
O que houve?
Using the verb HAVER.
This is one usage of HAVER that's very common. You'll often hear simply: que houve?