You may see an orange or green dot appear in the status bar of your iPhone, at the top right of the screen.
The orange dot appears when an app is accessing your microphone. For example, in the image above (with the status area magnified slightly) a sleep app is running that monitors movement and noise via the microphone.
If a green dot appears it means the camera is active.
It is not the case that both green and orange dots will appear. Instead, if an app is using both camera and microphone, only the green dot appears.
You should investigate if either of the dots appears without you knowing the reason.
If you would like to do this on an Android device take a look at this item.