The long bolt is called the axle. The axle nuts with thecurved sides that the bearing ride on are called cones. The long piece with the handle that fits through the axle is called the quick release skewer.
When assembling the cones onto the axle, you screw them finger tight, then back them off about 1/16-1/8 of a turn. After you tighten the locknuts, the wheel should spin freely and there should still be slight but noticeable side to side play when pushing and pulling on the axle.
Next you instal the skewer. When closing the lever, the effort should should leave an imprint on your palm. If it doesn't or you can't close it fully, use the nut on the oppsite end of the skewer to adjust the tension. Do not use the lever to srew the skewer tight. It is meant to clamp and unclamp the wheel by flipping it closed and open.
Once the the skewer tension has been properly adjusted and the wheel is clamped in the frame, spin the wheel. It should spin freely and quietly. Grab the tire and try to move the the wheel from side to side, There should be no play. Clamping the wheel in the frame should have removed the residual play in the hub cone adjustment. If there is play, the cone adjustment is too loose and you start over.
The wheel should be tested for side play at several points in it's rotation. Sometimes it will be perfect at one spot but loose at another. This is generally indicative of a bent axle and/or irregular cone wear.
Getting the cone adjustment right is a matter of trial and error, as most people back off the cone adjustment slightly when tightening the locknut. It can be frustrtating for beginners, taking several attempts but you will improve with experience.