Just wondering

Can u get and infection from masturbating or from humping things.

Thanks