There are types of grease you can use but generally it's best to stick with oil, I use Weldtite Cycle Oil.
Make sure the bike is properly dry before you apply the oil, I use a rag to lube the chain and a toothbrush for hard-to-reach bits.
You don't put grease on gears, you use oil on the chain.
NEVER use WD-40. Use Tri-flow, or mechanical oil, or Phil Tenacious oil or an equivalent. Try and keep it in the chain bushings, then wipe off the excess. You're trying to keep dirt from sticking to your chain.