The breaking down of the three-dimensional structure of a protein resulting in the loss of its function.