In biology, structure determines function. For proteins, this means that proper folding is everything!
There is a complicated network of molecules called chaperones which help new proteins fold correctly as they form. One of the most impressive of these molecules is the GroEL/GroES complex. This complex consists of a large barrel made of 14 individual protein units (GroEL), capped by a seven-membered protein lid. When it is uncapped, the GroEL barrel is hydrophobic, and large enough to accommodate proteins up to 60 kilodaltons in size – for reference, the average eukaryotic protein is about ~50kDa in molecular weight, so GroEL can accommodate a wide variety of proteins, large and small.
Proteins find their way into this barrel if they are misfolded such that their hydrophobic inside residues are pointed outward and can interact with the hydrophobic barrel walls. When the GroES lid caps GroEL, the misfolded protein is trapped inside, and the inside of the barrel turns hydrophilic. This change creates an isolated environment which favors proper folding and forces the misfolded protein to reorganize itself until its hydrophobic residues are on the inside where they belong!