Despite the air of mystery surrounding the art of wheel building, the construction of a good set of bicycle wheels is really a pretty straightforward task.
To get a proper length of spokes use a spoke calculator (search the web) or measure the old ones. You may have two different lengths of spokes (16 of each)!
Wheel lacing steps (32 spokes, three-cross pattern):
first set of 8 spokes
second set of 8 spokes
third set of 8 spokes
fourth and final set of 8 spokes
tensioning
centering
truing
Reference book: Lennard Zinn: Zinn&The art of mountain bike maintenance