Being able to run apps that draw on top of other apps is a powerful feature of Android. Apps like Twilight take advantage of that to add a filter to the display, but other apps just show a floating UI element. However, this can also be a security concern. Android O offers a handy alert when an app is showing an overlay with a link to turn it off.
Whenever you start an app with an active screen overlay, Android O generates a notification that tells you “[App] displaying on top.” This notification is collapsed into a single line, but you can expand it for more detail.
Android O feature spotlight: Android tells you if an app is displaying a screen overlay was written by the awesome team at Android Police.