It's a neverending question with a neverending supply of "experts" who have an equal number of opinions about the topic. The most important thing to remember is that every owner's manual for more modern firearms has a section that covers manufacturer recomendations for lubrication of that particular gun.
WHAT KIND? If you've ever set foot in a gun store, Bass Pro Shop, Cabella's, Wal*Mart, Gander Mountain, or Academy Sports & Outdoors, you have no doubt seen the plethera of oils & lubricants available (Break Free, Rem Oil, Hoppe's, etc.) All have good points and, like cars, many enjoy brand loyalty simply because "it's what dad used." Personally, I look for multipurpose products. There are are only three lubricants I use on my personal firearms.
Break Free CLP (Cleaner / Lubricant / Protectant) - This is a multipurpose product which, as the name suggests, cleans, lubricates, and protects blued, browned, tactical black, parkerized and bare steel surfaces.
Break Free LP (Lubricant / Protection) - Similar to CLP, but formulated without the cleaner for stainless steel surfaces.
Brownell's Action Lube Plus - grease formulated for use on high friction contact surfaces. (I use this exclusively for my M1 Garand bolt and pivot points.)
HOW MUCH? Usually one drop of liquid lubricant or a small touch of action grease goes a VERY long way. If the surface has a slight sheen to it (not dripping wet), then there is enough.
WHERE? Again, the best advice I can give is to follow the manufacturer's recommendations for where lubrication should be applied. If there is a point where metal hinges on a pin, if there is a point where metal slides on metal, if there is a spring either encased or guided by a metal pin, then some lubrication is needed.
If, for what ever reason, you don't have an owner manual for your firearm, check out my list of links to most firearms manufacturer web pages where downloadable PDF copies of their owner manuals are available.