There could be a number of reasons why this is happening. The problem could be in one of your hardware or peripheral devices attached to the computer. In most of the cases the problem resides in a faulty motherboard or graphics card. The operating system is not even booting but a pre-boot is allowed by the computer when the graphics card is bad. Even so, upon starting the computer you will notice some beeps which indicate where the error is. Although the computer started, the motherboard is out of the question and your best bet is the graphics card and you should replace it as soon as possible. Also, check the monitor and the cable which connects the monitor to the computer.
As you see there is a number of multiple possibilities why this is happening and you should check them all.