In that context, I think 'what's up' is seen as a vague greeting like 'hey' or 'hello' and 'what are you up to?'
If I saw my friend on the street, maybe I would say 'hey! what's up?'
'How's it going' is a casual way of saying 'how are you' but they are both informal greetings.
'What's up' can also be used in different situations/contexts:
'Hey, what's up? Are you okay?' (sympathetically)
Or if someone wants to ask you a question or for a favour, you could say: 'Yeah, what's up dude?'
Sorry! That might have been muddy! 'What's up' is a very vague term (: