It's hard to realize. There so many different types of hacking a phone. If you mean spywares or malwares were secretly installed on your phone and they are stealing information from your device, you could try a malware detector. If you are being eavestropped, then you need special equipment to detect that. If you find any malfunctioning such as battery straining, apps irregular crash or unwanted repeated restarts, you should take it seriously.
There are several things that will make you sense your phone has been hacked. You will start noticing unfamiliar charges on your phone bill. You can also notice that your battery is frequently draining and act crazy like opening and closing apps.