This question is rather too generic to provide a specific answer to. The generic answer would be, the key is stored somewhere in a area protected by OS, be it iOS, Android or what not and probably by the app. How secure the key is stored determines how safe 2FA with Google Authenticator is and the app developer must have chosen a storage place and a protection method appropriate to meet the end.
If you gave the reason why you need the key and which device you are running Google Authenticator on, bright people out there could shed light on your query.
The secret key (seed) is a unique 16 or 32 character alphanumeric code which is generated during the token enrollment. It is used to generate OTPs - one time passwords. The server and Google Authenticator both know the same secret key and based on it they generate the same OTPs. You can enter it manually or scan the QR code where the secret key is encrypted. So if Google Authenticator requires the secret key you should just scan the QR code from the service you would like to protect.
It is a shared key, so usually generated by the trusting party - so if you want a GA code for, say, Microsoft’s Azure AD, you will go to “enable MFA” and “TOTP” (the real name for the system Google Authenticator uses) and it will generate a new key, then show you a QR code to load that key into Google Authenticator.