The terms Hardwood and Softwood are inherently confusing because they do not define a precise line between “hard” and “soft” wood types. While hardwoods are generally harder than softwoods, this is not always the case. The distinction between the two types is actual a function of reproduction. All trees producing seeds, but the type of seed varies.
Trees that produce trees with some type of covering, such fruit or a hard shell like an acorn angiosperms also called Hardwoods. On the other hand, trees whose seeds fall to the ground freely are gymnosperms and called Softwoods. An example of a gymnosperm is a Pine Tree which grows its seeds in a cone before they fall to the ground to be dispersed.
Trees are also described as deciduous (Hardwood) and evergreen (Softwood). Deciduous trees lose their leaves in the fall and evergreens keep their leaves year round. While it is true that most Softwoods are softer than most Hardwoods this is not universal. For example, balsa wood, which is one of the softest and lightest woods, is a deciduous angiosperm or a Hardwood. So comparatively, as a generalization, you can be fairly safe assuming that as a category Hardwoods are denser than Softwoods but with individual wood species this is often not the case.
Stair parts are available in both Hardwood and Softwood. Solid Treads are typically manufactured from those wood species with higher Janka scores such as Red Oak Stair Treads. Other components such as handrails, newel posts and balusters are available in both Hardwood and Softwood variations because they are not walking surfaces. When considering the wood species for your stair or balustrade, while hardness is definitely a factory, most stair parts are manufactured from wood types that are suitable for their function. Greater considerations may be more aesthetic or price driven, this is especially true because Janka hardness is based on raw wood and finishes can also increase the hardness of the finished product.