More information needed.
Does it boot to the OS?
Any lights flashing? Any fans spinning? Anything on the screen?
Did it just start doing this?
Provide as much information as you can.
Yes it does boot to the os and the computer runs normally. All the fans spin and there are no light on it that you have to press f2 to open the bios but it does not open otherwise the pc runs normally. I bought the PC a few days ago and it did this since I bought it.
So you are just not able to press F2 and get into BIOS Setup? If this is the case, it could be because the previous owner enabled Fast Boot. You can fix this by,
When you see the BIOS Splash Screen, you should be able to press F2 (press it a couple of times) and get into BIOS Setup.