The moves for grinding are very simple - just sway your hips in front of your partner who is facing front, both knees somewhat bent, and leave a bit (and I mean a bit and closer) of space between yourselves. Easy. Of course, you can bend and place hands on the knees if you are the partner in front. You can get extreme and do the same with both palms on the floor. If you have several people nearby who want to do it, you can form a grind chain - a line of people gyrating front-to-front with little to no space in between them!
Grinding is mainly done to hip hop music, especially if the songs have overly sexual lyrics. But in the context of reggaeton, dancing it is called the perreo, because of the dog-like movements and poses of the partner in front.