Stop the camera from saving location
iPhone: open Settings → Privacy & Security → Location Services → Camera and choose Never. Photos taken from now on have no coordinates. Existing photos keep theirs. Third-party camera apps have their own entry in the same list.
Android: open the camera app's settings. On Pixel phones the switch is Save location; on Samsung it is Location tags; other manufacturers call it Geotag or Location tag. Switching it off affects new photos only.
Remove location from photos already in your library
iPhone (iOS 15 or later): open the photo, tap ⓘ, tap Adjust under the map and choose No Location. On iOS 16 and later you can select several photos, tap the ⋯ button and choose Adjust Location to clear them together. Photos keeps the original position so that Revert works, which means the coordinates are gone from copies you share or export but still recoverable on your own device. If you use iCloud Photos, the change syncs to all your devices.
Android (Google Photos): open the photo, swipe up, tap the location under the details and choose Remove location, or use Edit to set a different one. Select several photos and open the menu to edit their location in one go. Samsung Gallery offers the same under Details → Edit.
What is still in the file after the location is gone
All three methods above touch only the GPS block. Left behind are the capture date and time to the second, the device make and model, the lens, any serial numbers, the software version, the XMP packet with edit history, and the embedded preview thumbnail. Drop the photo into the checker on the home page after removing the location and you will usually still see Date & time, Camera & device and Software reported.
To clear everything at once, use a metadata cleaner. The browser checker does it for a single JPEG, PNG or WebP without uploading it. The iPhone and Android app does it for the photos in your library, including HEIC, shows the location on a map before you decide, keeps the original by default, cleans several photos in one pass with Pro, and can be called from the share sheet so a photo is cleaned on its way into another app.
Check that it worked
Do not check the photo in your own library; check the copy that leaves. Share it to a second device or account, save what arrives, and inspect that file with the checker or with the steps in how to check a photo for location data. If Location is absent from the report, the recipient cannot see where it was taken.