What is the purpose of using lubricants in machinery? Discuss the different types of lubricants and their specific applications.