Passwords are primarily used as a way of accessing information and also limiting the number of users who can get access to a machine. It is primarily used with a username for the authorization system.
Passwords or Pass Phrases are a string that is used to help lockout people who do not know this string from using a person's account or computer. They have almost always been used since computers were first connected with each other as a way of making sure that each user had the ability to know that their account on the computer or network was not going to be taken over by a peer worker who had something against them. It also makes sure that only the person who knows a person's username and password can get into their account and change things that they have access to.
On websites and other web-based services passwords are used to make sure that anyone trying to connect to the site or service is who they say they are. In addition to a username which may be another string or the person's email, it makes the server that the person who is trying to login (gain authorization to the site or service) more likely to trust them and allow them to gain access to it.