A Tome of Town Portal is a blue book that can contain up to twenty Scrolls of Town Portal. The book only takes two spaces in the inventory, and is fairly cheap, so it can be a good idea to carry one around.
The tome works similarly to the Tome of Identify, which holds Scrolls of Identify rather than town portal scrolls. If the tome is right clicked, a town portal will appear by the player, which can be used to instantly warp to the nearest Town. If all the scrolls are used up, the the tome cannot be used again until it has more scrolls put in it.
The tome of town portal is also used in an interesting Horadric Cube recipe. If it is transmuted alongside the Wirt's Leg inside the Rogue Encampment, then it will open a red portal to the Secret Cow Level.
The only other way of obtaining a Tome of Town Portal, as well as the Tome of Identify, other than buying it from one of the Act towns' magic vendors is from Bookcases in the Jail and Catacombs levels in Act I.