How do you get a password?

A user usually defines his own password unless it is assigned by someone else.

In most cases (as, for example, when signing on to this very website) you get a password because you created it yourself. Otherwise, the person who did create a password for something can tell it to you. Other than that there do exist techniques for "hacking" (as it is known) or decrypting a password. You can make a shrewd guess.