Vascular plants, e.g. gymnosperms and angiosperms, have complex permanent tissues that are responsible for the conduction of water, minerals, and food materials throughout the plant. These complex permanent tissues are the phloem and the xylem. The phloem, in particular, is responsible for the conduction of food material to the various parts of the plant. The xylem is the tissue that conducts water and minerals. In woody plants, e.g. trees, there are two types of xylem produced. These are the primary xylem and the secondary xylem. The primary xylem forms as a result of primary growth (i.e. increase in length) whereas the secondary xylem forms as a result of secondary growth (i.e. increase in girth). Secondary xylem is also referred to as wood. The wood yielded by angiosperms is called hardwood as opposed to the softwood, which is the wood yielded by gymnosperms.
Many of the hardwoods are compact and dense. However, there are softwoods that are much harder than some hardwoods. For instance, yews and longleaf pine are relatively harder than several hardwoods. Thus, the hardness of wood is not a basis to classify whether it is hardwood or softwood.
Looking at the xylem composition of softwoods and hardwoods. Most softwoods lack xylem vessels, which are present in hardwoods. It is because tracheids are the major water conductive tissue in gymnosperms. Most gymnosperm plants do not have xylem vessels. In contrast, most angiosperms have both tracheids and xylem vessels in their secondary xylem tissues.