Put your phone or tablet into Safe mode. This prevents any third-party apps running, including any malware.
On many devices you can press the power button to access the power off options, then press and hold Power off to bring up an option to restart in Safe mode.
If this doesn't work for your device then you should Google 'How to put [your model name] into Safe mode' and follow the instructions.
When in Safe mode you'll see 'Safe mode' at the bottom left of the screen.
Open your Settings menu and choose Apps, then make sure you're viewing the Downloaded tab.
Chances are you will know when your device started misbehaving, and you can usually line that up with a new app you might have downloaded.
If you don't know the name of the app you think has infected your Android phone or tablet, go through the list and look for anything dodgy-looking or that you know you haven't installed or shouldn't be running on your device.
Tap on the malicious app to open the App info page, then click Uninstall.
In most cases, this is all you need to do to remove the virus, but occasionally you might find the Uninstall button is greyed out.
This is because the virus has given itself Device administrator status.
Exit the Apps menu and tap on Settings, Security, Device Administrators. Here you'll find a list of any apps on your phone or tablet with administrator status.
Simply untick the box for the app you want to remove, then tap Deactivate on the next screen.
You should now be able to return to the apps menu and remove that app.
With the virus now off your Android phone or tablet, all you need to is restart the device to take it out of Safe mode.
Now that it's working correctly it's a good time to back up whatever important data you have stored on the device, and install an Android antivirus app to protect you from any future viruses that come your way.