Yes, the YubiKey can be used with any computer (including Apple Macs) that have a standard USB 2.0 port and support USB keyboards. The YubiKey identifies itself to the computer as a USB Keyboard, and is therefore OS independent. It works with Microsoft Windows, Linux, Apple Mac (OS X and macOS), Apple iOS (iPad/iPad 2/iPad 3 only), Sony PS3, Microsoft Xbox360, Nintendo Wii, and so on, without requiring the installation of any device drivers.
If you have purchased a MacBook with USB-C ports, you can still use a YubiKey on your Mac with the addition of a USB-C adapter. For more information, see our FAQ on how to use a YubiKey with USB-C adapters.