Can I install Linux and Windows on a Mac to triple boot the hardware?
It's possible to install them in multiple partitions and multiboot. But the resulting setup will be a little "rigid".

Doing OS X and Windows is easy. Adding Linux to the mix is a little more complicated.

I suggest you do not multiboot and only install OS X as the main OS and then use a virtualization solution, like Parallels Desktop or VMware Fusion. With those you can basically run a whole operating system, like Windows or your favorite Linux distribution, as if they were OS X applications.