How do you orgasm from being on top?

Most people who can orgasm from sex say they can do it while on top. What exactly do you do while on top to orgasm? Is it the penetration or rubbing the clit on him? And if you’re just rubbing your clit on him, does he get pleasure from that? I want to try and grind on my boyfriend but I don’t want to look like an idiot and Idk how to grind on a dick, please help me I have no friends to ask 😭