The great part about Linux is that it will run on just about any thing. If you have an old computer that is just sitting around collecting dust, this would be the perfect opportunity to breath new life into it and put it to good use (64-bit capable processor recommended).
Raspberry Pi’s can also be used as inexpensive entry-level servers but require a special version of Linux that supports its ARM CPU architecture. It is possible that the project you’re aiming to build doesn’t support ARM, so it’s best to make sure before purchasing one.
Of course, any newly purchased or built computers will work as well. Specific hardware recommendations depend on the type of project you’re aiming to employ, but quad-core CPUs and RAM are relatively inexpensive so I recommend four cores and at least 8 GB of RAM if springing for newer hardware.