It means that when someone does something bad to another person, then eventually that same bad thing will happen to him. A lot of people will say it when someone does something bad to them -- indicating that they will take revenge.
eg: He felt guilty about what he did, with a feeling that what goes around comes around.
Note:
What goes around comes around的意思是恶有恶报。如果你对别人不好,最终不好的事情也会发生在你身上。当受到伤害时,很多人会说这句话来诅咒。