Unless something is installed to system, in which case a reflash is needed.
However, DS is correct: we need to know what is happening rather than just "it's hacked". It's much easier to suggest fixes when you know what you are dealing with.
If you do actually have a hack then you need to change your Google account password and enable 2 factor authentication. Hacking the Google account is the obvious way to get into a phone, and a reset won't help you in that case. And obviously use a different device to do so if you don't trust the phone.