A tomato fruit goes through several stages in the process of its development.
i) The first stage is the young, immature, green fruit. The fruit continue to grow, reaching its full size still in the unripe stage.
ii) When the fruit has reached its mature size it then starts to ripen up, turning from green to, most usually, a red colour due to the development of lycopene pigments. Tomatoes can also ripen to orange or yellow, or anything in between. Some tomatoes ripen without changing colour, staying green throughout.
iii) Once a tomato fruit has fully ripened it will start to get over ripe, and in most cases the flesh will start to get soft. This is part of the natural rotting process and is caused by the flesh breaking down. If the fruit is still on the plant it will fall off as the fruit become rotten.
Vine ripened tomatoes
Vine ripened tomatoes do not have the gene that causes ripe fruit to rot. They are harvested as whole trusses of tomatoes, cut off the plant when all the fruit in the truss are ripe. This would be impossible if the fruit started rotting once becoming ripe.
Tomatoes without the rotting gene will not get soft, and are much more likely to stay on the truss without falling off.