Underlay is very important and to some extent may be overlooked. Underlay assists in improving underfoot comfort, improves thermal insulation properties of the carpeted floor and gets rid of imperfections in the floor.
3 main types of underlay are felt, rubber and foam. There are a wide variety of thickness, sizes and grades. Different stores will have different varieties of quality and quantity and they will give you feedback on which suits your home best.
Underlay has a long life expectancy so replacement is not to common unless needed to renovate or deep imperfections.