There are not too many options for dealing with a bad central processing unit (CPU) inside of your computer. One of the first things you should do, however, if you think that you have a bad CPU, is to try a few tests to be sure that your CPU really is bad and that it is not something else keeping your computer from operating properly. If it is the CPU, then you should consider returning the CPU if it is fairly new for a replacement, or simply replace the bad CPU with a new one if it is no longer covered by a warranty or return policy.
The CPU inside of a computer is both the heart and brains of the machine. It provides a pulse that establishes the rhythm by which all applications and processes run, and it processes data as you access programs, files, and applications on your computer. If you have a bad CPU, then there are not many options available to you beyond replacing the CPU or the computer itself if you do not wish to work on the components within your computer. Options to repair a CPU are fairly limited, unless you are a computer scientist or processor engineer.
One thing you should do, however, is determine whether your problem really is a bad CPU or perhaps something else that seems like a bad CPU. If your computer will not start up at all, then you should check to be sure that secondary lights like those on wireless network cards and the power switch of your monitor are still coming on. Those lights not coming on when power is otherwise going to the computer could indicate that your power supply has died and not a CPU issue.
If your computer will just begin to start up when the power is turned on, but quickly shuts down and emits a series of beeps from within the computer tower or case, you may have a bad CPU or similar problem. You should check the documentation for your motherboard to see what the beeps indicate, as the number and pattern of beeps can reveal the problem. This type of failure to start can often be a functioning CPU preventing startup due to another issue, such as a malfunctioning or improperly connected heatsink.
Once you have eliminated any other potential problems, you can then be more sure that you are dealing with a bad CPU. If your CPU is bad, then you will likely need to replace it with a new one. A new computer or CPU is usually under warranty or return policy from where it was purchased, and may be exchanged fairly easily. Older CPUs will likely have to be replaced with a new one or a new computer if you are unwilling to replace the processor.