I loaned my laptop to a friend and when he returned it to me it has a password and he cant remember it
how can i bypass it?

yeah ,right ,you cant, you will have to sell it for 29$ to me .lol

if it a windows password just boot to safe mode and remove it in the control panel ,users

Many users forget to put an Admin password on XP. If you boot into safe mode you can access the Admin login -- there you can change/remove any "user" passwords.

While you are at it -- ADD an ADMIN password and write it down. Then create one for your login as well.

If you are going to loan your machine, create a user login for that person that you can delete afterward, and make sure it only has "user", not "admin" rights.