You first off have to make sure it's compatible with the socket on your motherboard. You cannot mix and match them unfortunately. First find out what you have and buy accordingly.
Also when buying a cpu there are some features which you might benefit from and some you won't. So you could overpay for something you don't necessary need.