When a protein folds, the titratable amino acids in the protein are transferred from a solution-like environment to an environment determined by the 3-dimensional structure of the protein.
Typically the effects of the protein environment on the amino acid pKa value are divided into pH-independent effects and pH-dependent effects.