AirPlay is a patented wireless technology developed by Apple for wirelessly streaming content between compatible devices sharing a network. Those devices could be your MacBook streaming a document to an AirPlay-compatible printer, an iPhone streaming music to wireless speakers around your house, or your desktop Mac streaming an HD movie to your TV.
How to use AirPlay to stream video or mirror your iPhone or iPad screen | Apple Support
AirPlay or AirPlay 2.0 is part of the operating systems that all Mac computers and iOS mobile devices run. As long as they are on the same network, all these devices can stream content from one device to another and to all AirPlay-compatible devices that are also on the network.
For digital music, you can stream it to your TV equipped with an Apple TV, share it with other devices using an Airport Express, or listen to it on AirPlay-compatible speakers. With AirPlay 2, it is possible to stream digital music to multiple rooms equipped with AirPlay-compatible speakers simultaneously or directly to headphones available from most major headphone manufacturers.
As with any wireless network, you need a device to send information and a device to receive that information: