The answer to this depends on the type of relations you have with the person who is asking.
In a formal setting you normally wouldn't hear "What's up" unless the person asking is actually trying to make the situation feel less formal and stuffy. If you want to be still somewhat formal and polite about it you can say something like "Oh, nothing much, and how are things with you?". Also, in formal settings the answer you have learned in class is perfectly suitable.
In more casual settings or among friends or with people who have known each other for some time, you can say things like:
-"All is well, thanks! What about you?" - generic friendly response
-"I'm great and happy to see you. And how have you been?" - if you are in a good mood and haven't seen the person for some time.
If you are talking to a close friend, you can be more specific and go into more detail both in your answer and in the reciprocal question, for example:
-"I am mostly well, but tired. What about you? Is your boss letting you go home earlier these days?" - you'd be giving a more honest answer about yourself and asking about a specific issue you know your friend has been having a problem with.
If somebody asks "What's up" in a casual setting, you can either be neutral about it ans something like "Same old, you know. How about you?"
Or with a friend, you can actually answer with specifics: "I've been pulling all-nighters studying for the exams.