No. There are different processors that fit the same socket but won't run. Generally there are two things to check: 1) does the upgrade require more power and is your current PSU up to the task; and 2) does your particular motherboard support that particular CPU.
In the first case, power, your new processor may consume sunstantially more power and if you have an under powered PSU which is just fine for your current processor the new one may put too much load on the PSU. And if you are upgrading because the machine is generally out of date that would mean you also have an older PSU and they do age. So plugging in a newer, more power hungry processor may push an old PSU over the edge.
In the second case, check the motherboard...