The bulbocavernosus/bulbospongiosus muscle (BC muscle) and the pubococcygeus muscle (PC muscle), there is also a Iliococcygeus muscle (ic muscle), by strengthening these muscles by contracting them when you kegel, you can improve ejaculation power/orgasms and when you kegel you can also prevent ejaculation.

In males the PC muscle and ic muscle is closer to the anus, which can also tighten your anus when you contract/kegel.
In males the BC muscle is closer/on the penis, which can also contribute to erections.

For females, kegling can tighten up their vagina, urethra, and anus.

If you overwork these muscles, they will be too tired to work correctly.