I'm not a tech expert. There are "sellers" in the market who claim they can install such apps remotely. I tend to doubt it, personally. I think a person needs personal access to the device.
But when you think about it, lots of people have kids, and it's possible to track a parent by installing such a thing on their phone. And there are lots of other nefarious ways stalkers can track what you're doing. Tech is just another tool, but it's a tricky one to recognize.
ETA: Some apps allow others to see your location if GPS is enabled and the settings on the app aren't set to private.