Installing a tracker would only be illegal if he didn't own the car. (But yes if it's solely in OPs name then it would be technically speaking illegal, but more probably a civil matter.)
Yes it's very possible to install spyware on an ipad provided that you have physical access to it at some point. EG if you go out, your DH gets your ipad, installs the app (there are several which do this), then the app will automatically either email him your activity every so often, or he could access it online. Either way, you can't see the app on your ipad (otherwise it would be a bit pointless.)
When you say your ipad "glitches", do you mean it resets itself? If so, this would automatically reset all your recently used apps, so the "taskbar" will go back to default (which depending on which version ipad it is, might be all of the default apps - mail, safari, books, music, app store, etc).
If you want to get rid of it, do a factory reset. If it's glitching this would actually be a good idea anyway! Be aware you'll need to back up your photos and stuff first, and you'll have to redownload any apps.