Welcome to Android Central! Chances are that you have a phone with a security feature where a PIN is required for a factory reset. It's often the same master PIN as the one used to unlock the screen -- do you know that? If not, then clearly someone else created the PIN, which means someone else had the phone before you. Your best bet is to try to contact that person and ask for their help.