By cleaning them! But seriously, there were a variety of methods and ideas on dental hygiene. The big myth is of course that everyone walked around smelling horrible and nobody cared. Except of course that when your breath stinks, people have pretty much always cared (at least in a European cultural context).
Basically the methods boil down to one of three;
Rinsing and mouth wash: Hildegarde of Bingen's 'Physica' (1158), Trotula 'On Women's Cosmetics' (11th Century), Bankes' 'Herbal' (1525), Gilbertus Anglicus (11th century), Markham's 'The English Housewife' (1615) all suggest some kind of rinsing or washing of the mouth with such diverse liquids as 'pure, cold water', 'very good wine', 'vinegar that mints have been sodden in' and 'wine that birch or mint has simmered in'. Clearly there is a theme here of rinsing with water or wine, often with mint as a component. This would be reasonably effective, especially when paired with;
Rubbing! Several sources (Trotula, Bankes' Herbal, Gilbertus Anglicus, Gervase Markham et al) all suggest rubbing the teeth with something, normally a 'new white cloth' or with 'sharp linen cloth' sometimes infused with herbs. Bankes' includes the wondrous passage;
'Also take the timber thereof [rosemary] and burn it to coals and make powder thereof and put it into a linen cloth and rub thy teeth therewith, and if there be any worms therein, it shall slay them and keep thy teeth from all evils'
Likewise, 'The English Housewife' suggests 'Take sage and salt, of each alike, and stamp them well together, then bake till it be hard, and make a fine powder thereof, then therewith rub the teeth evening and morning and it will take away all yellowness'.
Alternatively it also states 'Take a saucer of strong vinegar, and two spoonsful of the powder of roche alume, a spoonful of white salt, and a spoonful of honey: seethe all these till it be as thin as water, then put it into a close vial and keep it, and when occasion serves wash your teeth therewith, with a rough cloth, and rub them soundly, but not to bleed'
This contrasts with Angelicus who clearly states that one should rub 'until they bleed', but some contradiction is only natural. These methods seem somewhat efficacious and also provide the motivation for dental hygiene; the same as it is today, both vanity and health must be provided for.
Angelicus states; 'Take of cloves, nutmeg, cinnamon and mace, eight drams; of red sandlewood, ten drams; of quibibis, seven drams; of cardamom, five drams. Mix them with the juice of mint and make pills of the size of a fig. And let him to have two of them under either side of his tongue at once.'
Trotula reveals that good smelling breath was a part of romantic attractions with her recipe; '"I saw a certain Saracen woman liberate many people with this medicine. Take a little bit of laurel leaves, and a little bit of musk, and let her hold it under the tongue before bad break is perceived in her. When I recommend that day and night and especially when she has to have sexual intercourse with anyone she hold these things under her tongue."'
Lastly, in Rumpolt's 'Ein Neu Kochbuch' (1581), there were included recipes for comfits with anise, caraway and fennel seed coatings, all of which were designed to promote digestion, combat gas and sweeten the breath. (though of course they would do NOTHING for tooth decay, being full of sugar. Alas.)
That about covers my knowledge of dental hygiene. I believe that the Qu'ran or associated writings make reference to dental practices that Muslims should follow.
Sources are my own knowledge and such sources as are contained within; (http://www.gallowglass.org/jadwiga/herbs/teeth.html) et al.