Officially, your Mac can send AirPlay streams, but can’t act as an wireless AirPlay receiver. For receiving AirPlay streams on your Mac, additional software is needed. One of the solutions for that is AirServer, which allows you to mirror your iOS display or stream content from your iOS devices to your Mac. So it works similar to an Apple TV, just on your Mac.