sew = sow
The saying's roots are agricultural. When you sow (plant), you get (reap) in return a final product.
So, if you nuture, invest in, or do good things, in return, you should get good things.
Usually, it is used in a negative context for negative behavior. For example, a person that treats others poorly is likely to get treated poorly themselves.