If you believe you can identify the app or file responsible and can find the location of the virus you may be able to uninstall the app or delete the file by booting your phone into safe mode. Some viruses gain administrative rights so if you find an app you think my be the cause of the virus but it won't let you uninstall it, then boot the phone in safe mode and go to your settings menu and open device administrators, find the app and remove its administrative privileges. This will now allow you to uninstall the app. You may also want to disable apps from unknown sources if it is turned on which is also in the security setting menu. Once app is uninstalled or deleted reboot the phone normally and confirm it is working as it should.
If you can not track down the app or file that is responsible for the virus then you can perform a factory reset and this will restore the phone to factory settings. This will remove the virus for sure. If you do this your saved data will be erased, so backup any data you want saved before doing the factory reset.
Reply back if you have any questions or need more guidance. Hope this helps