I was at a flea market the other day and bought a computer. However, the computer is locked and I can't login to it. Is there a way to format the computer and install Linux on it?
It seems like the computer has been an old work computer and that there is an administrator account.
By locked I mean that the computer has an admin, and when I try to install linux from a bootable cd it does not start from that cd, saying I don't have the rights.
Some computers intended for business use have an optional boot password that can be set in the BIOS.
You may be able to reset this by removing and replacing the battery on the motherboard. If in doubt obtain a user-manual for the specific model of computer or for the motherboard.
However this sort of hardware/firmware password would be requested by the computer prior to any indication of Windows booting. It isn't clear from your question if this is the case.
Note: The term BIOS is used loosely here.
UEFI Secure Boot
You may need to disable Secure Boot. or install a Linux distro, such as Ubuntu, which supports it.
Microsoft Windows Administrator passwords
Normally, Windows Administrator accounts should not prevent you booting from a device like the DVD-ROM drive or a bootable USB stick.