Weight gain is easy - if you eat more calories than you use, you will gain weight.
However, as an athlete we are generally looking for muscle gain and not just gains in overall weight.
So, to gain muscle mass and therefore power and strength, we need to get stronger. Many athletes who have
never done any strength work before will be able to make gains by the use of circuit training (some novice runners who have been
sedantry for many years will get stronger legs from running). However, in the long term the best way to get stronger is to lift
weights.
When we do strength work we break down the muscle tissues, which react to that by trying to build up stronger than they previously
were and therefore grow.
This is a seemlingly destructive process, but provided that you supply your body with the right nutrition it copes very well.
Protein is used to rebuild muscles, and there are many food types which are rich in protein. However, the most any athlete is likely
to need, in terms of protein intake, is 1.8g/kg that they weigh - any more than this and it is just used wasted from a muscle building
perspective. Most people analysing their diet will be getting pretty much this amount, so normally protein shakes etc are not all
that useful.
Sometimes vegetarians may need to supplement their protein intake - but this can be done with eating more nuts etc.
The important thing when gaining weight and muscle is that you don't increase the proportion of your diet that is fats, particularly
saturated fats.