A warlock trainer is an NPC that offers warlocks the opportunity to train abilities and reset their talent points.
In addition to warlock trainers, some locations also hold demon trainers. Demon trainers offer warlocks the opportunity to randomly generate a new name for any of their primary demons at a cost of 50 a time per minion. This is achieved by obliterating the existing minion, allowing the warlock to summon a new demon in its place.
Prior to patch 3.0.2, demon trainers were actually vendors of grimoires, used for training demonpets. Grimoires are not available anymore, since all demon abilities and spells are automatically learned as pets gain levels.
A general rule of thumb for finding the local Warlock trainer is to search the city's shadier establishments. Tucked away in dark streets and buildings are what you seek. Unsurprisingly, most guards provide directions to Warlock trainers with suspicion and contempt.
Patch 4.0.3a (2010-11-23): Warlocks can now pay demon trainers 50 to destroy their old demons, thereby letting them summon new ones with, potentially more desirable names.
Patch 3.0.2 (2008-10-14): Demon trainers no longer sells grimoires for warlocks.