There has been growing evidence that cooperative interactions and configurational rearrangements underpin protein functions. But in spite of vast genetic and structural data, the information-dense, heterogeneous nature of protein has held back the progress in understanding the underlying principles. Here we outline a general theory of protein that quantitatively links sequence, dynamics and function: The protein is a strongly-coupled amino acid network whose interactions and large-scale motions are captured by the mechanical propagator, also known as the Green function. The propagator relates the gene to the connectivity of the amino acid network and the transmission of forces through the protein. How well the force pattern conforms to the collective modes of the functional protein is measured by the fitness. Mutations introduce localized perturbations to the propagator which scatter the force field. The emergence of function is manifested by a topological transition when a band of such perturbations divides the protein into subdomains. Epistasis quantifies how much the combined effect of multiple mutations departs from additivity. We find that epistasis is the nonlinearity of the Green function, which corresponds to a sum over multiple scattering paths passing through the localized perturbations. We apply this mechanical framework to the simulations of protein evolution, and observe long-range epistasis which facilitates collective functional modes. Our model lays the foundation for understanding the protein as an evolved state of matter and may be a prototype for other strongly-correlated living systems.