A balanced diet that features all these will provide the necessary ingredients to help your muscles repair and rebuild after ... muscle performance and help prevent the loss of muscle mass.
Keep in mind that the above is a tremendously simplified version of what actually happens in your body after a weight training ... a small amount to muscle mass, especially for beginners.