Assuming you are talking about the computer having a user account that your friend doesn't know the password to, merely doing a clean install of the operating system will solve the problem. Considering the computer is used, I don't know what you wouldn't do that anyway.
It should also be noted that Windows Vista is no longer supported and hasn't received security updates in over a year. Instead of doing a clean installation of Windows Vista, I would recommend doing a clean installation of Windows 7, Windows 8.1, or Windows 10 instead.