AB2012: Games installed via offline installers contain the same in-game code that triggers achievements and "talks" to Galaxy. However, regardless of how you installed a game (via Galaxy or offline installers), you do still need to have Galaxy running though for achievements etc, to work.
StingingVelvet: I know I had the experience once of playing a game offline and then loading that same game with Galaxy near the end and getting a dump of like 30 achievements from the entire thing.
I believe the Galaxy related stuff is stored in
%LOCALAPPDATA%\GOG.com\Galaxy\Applications\ where you'll find a folder for each game, named as a 17 digits number. This is the
clientId (not the
gameId, which is a 10 digits number) and can be found in the
goggame-gameId.info file (viewable with notepad, or similar), located in the root folder of every gog game.
I've never used/installed Galaxy, but I have a bunch of folders in that location. Some games will store their settings and save files there, like Children of Morta, for example. So one should be careful (backup first) if wants to delete some of the Galaxy stuff in there.