Here is an Apple article with various startup screens you may encounter:
If your Mac doesn't start up all the way - Apple Support
Usually if you don't know the password to unlock it, then you will need to have Apple or an Apple Authorized Service Provider assist you assuming you can provide valid proof of purchase & personal ID which is deemed acceptable by Apple.
FYI, here is what people should do prior to selling their Mac (won't help you now, but keep this in mind for the future):
What to do before you sell, give away, trade in, or recycle your Mac - Apple Support