Webster defines "cavity" as
1. an unfilled space within a mass especially a hollowed-out space.
2. an area of decay in a tooth
So, a cavity on a tooth is any space that is hollowed out and where there has been a loss of healthy tooth structure. A dentist will typically numb you prior the cavity being filled, prepare the tooth and put filling material in to make the tooth whole. This usually works well for small to medium (<50% of the tooth) cavities.