Three ways someone can see your location
1. You shared it. From Find My (Apple), from Google Maps or Google's Find Hub app, from a chat, or from a social app with a map. This is the most common way and the easiest to forget.
2. Someone turned it on from your phone. With your unlocked phone in hand, sharing your location with their own account takes seconds. Nothing needs to be installed.
3. They know your account password. Find My and Find Hub exist to locate your devices. If someone else signs in to your Apple or Google account, they can see where your phone, watch, or tablet is without any "sharing" at all.
What the other person actually sees
On Google, according to its own help pages, people you share with see your name, profile picture, real-time location, and battery status. You can also allow each person to create notifications about you, for example when you arrive at or leave a place.
Apple has something similar with Notifications About You in the Find My app: someone can get an alert when you get home or leave work. Check those too, in the Me tab.
On Google, this setting is device and account-specific: if you have two phones or two accounts, check each combination.
Will they know if I stop sharing?
Apple is clear about it: when you stop sharing, the people you shared with may notice, and on earlier operating systems they may receive a notification in Messages.
Most of the time this doesn't matter at all: if it's someone you met up with once, no harm done. But if you're worried about how that person might react, read the section on sensitive situations below first.
The iPhone tool: Safety Check
Available since iOS 16 in Settings > Privacy & Security > Safety Check. It has two options. Manage Sharing & Access lets you review, person by person and app by app, what you share, including your location.
Emergency Reset immediately stops sharing with all people and apps, and helps you review your emergency contacts and the devices signed in to your account, and change your Apple Account password.
Apple describes it as an iPhone feature. On iPad or Mac, you review things manually in the Find My app and privacy settings.