You can stop sharing a screen from the TV or from the mobile device.
With the application you use to start Miracast, you can disconnect and stop watching the screen of the device on TV. The TV will switch back to the last selected programme.
To stop watching the screen of the device on TV, you can . . .