What do I do about forgetting password
What do I need to do forgot password
What do I need to do forgot password
Which password?
Worst case with Macs if you forgot and can't access it is that you can completely reformat and reinstall the operating system using Recovery HD or Internet Recovery. That will wipe all data though.
There are other ways to get working again. What model Mac do you have? If it's one with a SATA drive it's pretty cheap to recover from it with a new drive. Maybe do something like what my wife does which is write down the password on a sticky note and place it right next to the keyboard. Not very secure, but she doesn't really care if anyone else uses it.
Your question is not still clear for which password you can read some articles
What do I do about forgetting password