means that
the way people treat others may eventually bring similar treatment or consequences back upon themselves.
also
As you sow, so you reap.
Imagine a case where you will get the results, good or bad, of what you have done.; then “What goes around comes around” fits well.