A cellular process that results in the biosynthesis of constituent macromolecules, assembly, and arrangement of constituent parts of a protein complex. Includes the synthesis of the constituent protein molecules, and those protein modifications that are involved in synthesis or assembly of the complex.