What is the best Spanish translation of the English idiom,
What goes around comes around?
Apart from the ones given by user1074377. I'd add these ones:
Lo que se siembra se recoge
which means that good actions will lead to good results and bad actios will lead to misfortune, comparing the results with the sowing and the harvest.
Quien siembra vientos recoge tempestades
which means that bad actions (metaphorically referred as winds) will bring bad results(metaphorically referred as storms).
In Spain "A cada puerco le llega su sábado" is said as
A cada cerdo le llega su San Martín
because the day of "San Martín" (November 11th) is a traditional day for the slaughter of that animal. So they compare the day of the slaughter to the day when the person has to pay for his sins.
As suggested by Gonzalo Medina (thanks):
El que las hace las paga
Idioms like this generally don't translate directly to Spanish (or most languages) so there's really not a perfectly equivalent translation.
However, You can take the idea of the proverb and find a proverb that has a similar meaning in Spanish.
Some of my favorites:
"El mundo da vueltas"
"Uno recibe lo que se merece"
"A cada puerco le llega su sábado"
You can find heaps of proverbs with same/similar meanings by doing a Google search.