Usually the way to hard-reset an android device is by pressing a combination of the hardware buttons. Unfortunately, it's not universal, so make and model is important to be able to find the correct method.
Now, if it's a security lock, you should be able to unlock it with the credentials of gmail account it's registered to. Since you said you just got it, would it be possible for the person you got it from to unlock it and then wipe their information from it? I would also point out that if it is locked, then it is already registered to someone else's account so it is very important that it be reset.