Pictured below is the profile of the gullet between two teeth on a typical cog.
Step 1: The Hook
Step 2: Check for Hooking Wear
Step 3: Grind Away the Hooks
It is generally not good practice to grind from the side of an abrasive wheel, but you are removing so little material that there is no risk. You are not grinding at the bottom of the gullet. Doing so might result in uneven fit of the chain on the cog teeth. Just touch the teeth to the wheel for a second or two and move on to the next tooth.
Each cog is stamped with the number of teeth on that cog. In order to stay aware of your progress, check the number and count as you finish each tooth. You will easily know when you have finished.
I have obviously removed the rivets that hold most clusters together. To remove the rivets, lightly grind the heads away from the smallest cog. Use a nail as a punch and tap a couple of light taps to push the head out enough to get a plier onto it. Pull and twist carefully to remove the rivet. The spacers between the cogs are plastic. I learned from experience that driving the rivets out the entire way with a nail can crack the plastic spacers. Removing the rivets makes cleaning the cluster much easier. Soak in a cleaning solution and wipe, or just wipe each cog and each spacer with a rag. Be careful to remove all of the road grit. If it gets between the cogs and the spacers, there will not be enough room on the spline for all of the cogs.
Step 4: Cassette Removal
Step 5: Assemble the Cluster
When all cogs and spacers are on in their proper order, thread the locking ring onto the spline's end and tighten well with a big wrench.
Grinding the hooks from worn cogs helps performance and extends cassette longevity. But, if your chain is worn beyond its tolerance, or the derailleurs are not properly adjusted, or the chain has a tight link you will still have chain skip or hopping and shifting problems. If you do not know how to adjust your derailleur, there are Instructables on doing that as well as tutorials various places on the Internet. Some bicycle owner's manuals include a detailed procedure for derailleur adjustment, too.
There is a practical limit to how many times you can grind the hooks from the cogs, but it is still worth the effort at least once or twice.