No, motherboards have these things called sockets the CPU gets placed on. There are several Intel sockets, and AMD sockets. Not all Intel CPUs work on all Intel sockets, and the same applies to AMD.
When you're building a PC you want to make sure the CPU you're buying is compatible with your motherboard of choice.