On an iPhone X or later or an iPad running iOS 12, swipe down from the upper right corner of the screen to open the control center. Swipe up from the bottom of the screen for older devices/operating systems. From there, tap the “Screen Mirroring” or “Music” widget and hit “Stop Mirroring” or “Stop Airplay.”