Lots of molecules contain H+ ions as part of their structure. When in solution with acids (which are H+ ion donors) these molecules may gain the extra H+ ions within their structure.
Similarly when molecules are in solution with alkalis or bases, which are both H+ ion acceptors, molecules may lose their H+ ions.
Removal or addition of H+ ions alters a molecule’s shape and structure. This is known as denaturation.
Denaturation can result in permanent or temporary changes to a molecule’s structure. If changes are temporary then restoration of the pH will return the molecule to its original shape.