How to stop squeaking in hardwood flooring

A squeak in hardwood flooring is caused by two pieces of wood rubbing against one another. One way to stop the sound is by reducing the friction of the moving pieces using a lubricant. I