If I'm not stating the obvious, you'll have to pick a motherboard which accommodates the same CPU type as your present one. There are several different CPU socket types. The MB manual should describe how to fit the CPU, and removal will be the same in reverse. The CPU cooler is the only thing likely to be difficult, and how it's fitted depends on what kind it is.