I was taught that abgeben means zurückgeben.
But I already heard abgeben being used in situations in which not necessarily the person was returning something. For example:
Ich muss die Hausaufgaben abgeben
Abgeben is not a synonym of zurückgeben.
To explain the differences between abgeben, geben and zurückgeben, let's have a giver A, a thing X and a recipient B, so that A gives X to B. Zurückgeben tells us something about X, namely who owns it or who had it before. In case of geben or abgeben, it's possible that B owns X, but it not necessarily and it's not the focus.
In case of geben, you usually have to mention the recipient, or it is clear from the context who it is. There is a jemand whom it is given to.
Abgeben doesn't need the recipient. It's useful when the focus is on the giver.
An example: You are the chairman of a great enterprise, but you are already old and want to enjoy the evening of your life, i. e. you no longer want to be the chairman. You can say
Ich gebe den Vorsitz ab.
You and your action are the focus and it's clear. A successor doesn't play a role yet (you could add them, though, e. g. Ich gebe den Vorsitz an meine Tochter ab.). Maybe there's one, maybe there isn't, whatever.
Ich gebe den Vorsitz.
Now, everyone will stare at you in silence, waiting for you to finish your sentence. Without a recipient, it's incomplete, it's incorrect.
With homework, it's common to use abgeben. In a way it's clear whom you give your homework to, but you also often not directly give it to them. The teacher may not go around and have everyone hand them their homework, instead students may put it on a stack on the teacher's desk. In case of a test, let's say you are given a multiple choice test printed on sheets of paper, you would also use abgeben and could very well argue and nitpick, that it's also zurückgeben, because you give their test back to them. Another example is soccer, when you pass the ball (e. g. the sports commentator has no clue who gets the ball).
Without a recipient, abgeben can also mean something final. E. g. the chairman above won't come back from retirement. Or even
Den Löffel abgeben.
a colloquial way of saying that someone dies.
Instead of zurückgeben, one could also say wiedergeben, but it has also several other meanings (Duden).
Geben really has a lot of different meanings (Duden), so you may also see something like Ich hab alles gegeben (I gave everything), when it's not necessary to have a recipient.
I'm surprised to hear that "abgeben" should mean "zurückgeben".
It means to give something. It might occasionally mean to give back, but most of the time it doesn't.
"Abgeben" is often used to denote giving a part of something, like sharing a cake. It is also used if the receiver is not mentioned or not important, like he didn't have the funds to keep the house or the car, so it hat to be sold.
The other meaning with "Hausaufgaben" focuses not on transfer of ownership, but on handling something over, usually for further processing. Like homework for the teacher to mark, a letter or parcel for the mail to deliver.
The verb geben translates to give:
- Gib mir mal bitte ... ⇆ Please, give me ...
The meaning of abgeben is very much context dependent. The first example in the following list shows how wieder abgeben may be used in the sense of zurückgeben.
den Leihwagen zurückgeben/ wieder abgeben ⇆ to return the rental car
Hausaufgaben abgeben ⇆ to hand in/ submit homework
ein Paket abgeben ⇆ to deliver a parcel
eine Sache abgeben/ abliefern ⇆ to provide/ hand in/ deliver sth.
jmdm. etwas abgeben ⇆ to pass sth. on to sb.
etwas an jmd. abgeben/ übergeben ⇆ to pass sth. to sb.
sich mit etw./ jmd. abgeben ⇆ to bother with sb./ sth.
seine Macht abgeben/ abtreten/ überlassen ⇆ to cede one's power
seinen Pass/ Führerschein abgeben ⇆ to surrender one's passport/ driver's license
Hitze/ Strahlung/ Energie abgeben ⇆ to emit heat/ radiation/ energy
ein Signal/ einen Ton abgeben ⇆ to generate/ release a signal/ tone
seine Stimme abgeben ⇆ to cast one's vote
einen Schuss abgeben ⇆ to fire
den Löffel abgeben (sterben) ⇆ to kick the bucket