The short answer to the question is nutrition and rest. Nutrition constitutes 15-20 percent of the equation and rest constitutes the remaining. As you can see, rest is the more important part but do not worry, I will educate you on both. This article is written in sequence of their importance so do not pick and choose what you want to follow and what you do not want to.
The reason why sleep accounts for such a huge percentage is simply because muscles grow when you sleep and go about your normal activity outside of the gym. You can pump all the iron you want in the gym, hang out late into the night and I can assure you no growth will ever come to you. Weight training puts a big demand on the body and if you abuse it even further without proper rest, it will result in viruses and bacteria attacking your body as your immune system takes a dip. It isn’t even enough just taking an 8 hours rest. It is about taking uninterrupted proper sleep. If you simply sleep 2 separate sessions of 4 hours that does not mean you get an 8 hours sleep, you simply got two 4 hours rest.
Now that the priority is out of the way, let us focus next on genetics. Some people have an amazing body that learns very fast and adapts quickly but for the rest of us diet and nutrition can help a lot. Before all the muscle building supplements come in, focus on your intake of Vitamin C and Zinc. Vitamin C keeps your immune system strong which ward off viruses and bacteria so you do not lose your muscle mass by falling ill, but also cope with the extra demands of weight training have on the body. Zinc helps in the absorption of Vitamin C to the body and that is the reason why it is key to focus on this two after you have nailed your habitual 8 hours uninterrupted sleep.
Next up is your protein intake. Muscles are repaired by the amino acids in protein so it is key to know how to deliver the right type of protein at the right time. Eat food or supplements high in whey when you first wake up and immediately after your training so that the body can utilize a short chemical chain protein quickly. This provides much needed protein and fuel to the muscle immediately. With that being said, that does not mean your entire diet is filled with eating whey all the time. The short chemical chain means that whey breaks down with an hour which does not aid the repair after. So be sure to eat food or supplement high in casein which is a more complex protein source an hour after training and throughout the day so that your body is always repairing the muscle. Be sure also to also consume a high carbohydrate diet immediately after your training as your muscle is deprived of energy and thus need to be refueled to ensure that the body do not break down the muscle you train so hard for.
Generally, muscle aches last from 24-48 hours. If you do need to train again during this time period, be sure to also consume Glutamine to relieves some of the aches. What Glutamine does is that it removes the waste product of weight training quickly so that the body can focus on repairing itself rather than have 2 tasks of repairing and getting rid of toxins.