Be sure to scroll down... there may be more than one question on this page!
The recommended height of a railing is 30" above the stair tread measured directly above the riser. This height will comfortably accommodate the majority of people. In case you don't know the terminology, the tread is the physical step, and the riser is the vertical board that closes in the back of each step. Some folks call it a kicker or kickplate. FYI, on a landing where you would install a horizontal railing, the height should be 34" above the floor.
Keep in mind that these are recommended heights. You local building inspector may use a different standard height, and can also give you an acceptable range should you want the railing somewhat higher or lower. The type of building is also a factor… private homes may have a different standard than rental or commercial buildings. A quick call to his or her office might not be a bad idea.
While you have the inspector on the phone, you might also want to ask about the acceptable railing types allowed in your area. I have heard that building codes in some areas are strict regarding open-ended railings… straight pieces of shaped wood handrail attached to brackets. Because there is a risk of clothing getting caught on the open ends of a straight railing, some localities are requiring that railings that curve or angle to the wall (called a "return") are acceptable. You can still use brackets… however a little extra carpentry is needed to miter an angle into the end of the railing to secure the additional wood. Again, what is acceptable for a basement stairwell may not be acceptable for your living space!