You should just be able to tap the screen to turn that off. If not, the force restart the device. See the instructions below, depending on the device you have.
If your screen is black or frozen
If your screen is black or frozen, you might need to force restart your device. A force restart won't erase the content on your device. You can force restart your device even if the screen is black or the buttons aren't responding. Follow these steps:
- On an iPhone X, iPhone 8, or iPhone 8 Plus: Press and quickly release the Volume Up button. Press and quickly release the Volume Down button. Then, press and hold the Side button until you see the Apple logo.
- On an iPhone 7 or iPhone 7 Plus: Press and hold both the Side and Volume Down buttons for at least 10 seconds, until you see the Apple logo.
- On an iPhone 6s and earlier, iPad, or iPod touch: Press and hold both the Home and the Top (or Side) buttons for at least 10 seconds, until you see the Apple logo.
Screen mirroring is turned on in Control Center. While you can tap on it accidentally, you should be able to clear the screen by just tapping on the screen.