From Diablo Wiki
The Town Portal returns in Diablo 3 (after numerous changes during development), with a slightly different function than it had in previous games.
The portal is now cast directly from a button on the belt interface; no scrolls or other reagents are required. There is no longer a portal cast in the dungeon; the character is transported directly to town, after a five second casting delay. If the character moves, casts another spell, or is damaged by attack during that time, the casting animation is cancelled; these features are designed to keep players from using Town Portal as an easy escape from danger.
The familiar blue Town Portal only appears in town, and players can run into their own portal (but not one from another player) to return directly to the spot they departed from. Town Portals are no longer required to move from town to the location of other players in the dungeon, since the in-game Banner system fills that function.
- Town Portals were out of the game for some time during development, and only returned in Beta Patch 10 in January 2012. See the Stone of Recall article for details about the pre-TP system.
 Development Cycle
Diablo 3 initially featured town portal scrolls much the same as those in Diablo 1 and Diablo 2. During early development, the D3 Team decided that this feature was too easily exploited as an escape from danger, and removed it. Jay Wilson explained this decision in a 2010 interview.. 
For a time, players could only return to town via Waypoints. To ameliorate that travel difficulty, the designers introduced various features including NPC merchants located in the dungeons, as well as the Scroll of Wealth (which evolved into the Cauldron of Jordan) to allow instant item selling from anywhere, as well as the Nephalem Cube to facilitate salvaging of items from the dungeon.
Jay Wilson commented on this subject during an interview at Gamescom 2010: 
Those other features remained in, but eventually the need for a speedy way to return to town became too pressing to ignore, and in 2011 the developers revealed that the Town Portal function was returning to the game in a new form. 
The new system was called the Stone of Recall, and its function was identical to the town portal system now in the game. A character clicked on their Stone of Recall and went into a casting animation. If they were uninterrupted by a monster or by moving or casting a spell, they would warp directly to town after about five seconds.
Unlike the Diablo 1 and Diablo 2 system, there was no blue portal created in the dungeon; characters were simply warped directly to town. In town a blue portal appeared, which would take the player back to the exact spot from which they'd departed, if they passed through it.
This system seemed to be the final design, until in early 2012 the developers revealed that the Stone of Recall, along with the Nephalem Cube and Cauldron of Jordan had all been removed from the game. The Stone of Recall changed the least, as a Town Portal icon, with an identical function to the Stone of Recall, was added to the belt interface.
 Blue Portals in Diablo 3
There were numerous red portals in Diablo II, to take players between distant locations that weren't appropriate for Waypoint travel. There were also town portals cast by NPCs that players could not use, such as those the rescued Barbarian NPCs cast in Act Five.
These types of portals do not seem to be a feature in Diablo III, other than the ones players see in town, after returning via a town portal. Players can not cast blue portals in the dungeons for other players to use, and while the Barbarian cast such a portal for the use of Deckard Cain in the first gameplay movie, released with the June 2008 Diablo III announcement, that feature/function was evolved away from over the course of development.
 Spell LoreHoradric Waypoint network, and work with similar magical components to the Teleport spell, however, it does not seem to require the same type of physical component as the runed stone of a Waypoint. The Brotherhood constructed numerous magical gateways between their mighty fortresses and settlements so that they could quickly concentrate their defences against any incursion by the Demons. With but a thought, the Crusaders of the Light could transport themselves to predetermined destinations many leagues apart.
It's likely that there are Waypoints with additional magic infused into them to allow the use of a Town Portal spell to the vicinity of that Waypoint. A Waypoint located at a former Horadrim fortress or settlement site could be what enables Town Portal spells to bring you there. If this is the case, it might be possible for a Sorcerer with enough skill to use a similar spell to teleport directly to a Waypoint.
It could also be a completely different set of teleportation nodes, besides the actual Waypoint network, made specifically for retreating back to the nearest safe place, and nothing else.
Although the secret of creating these gateways as well as the Waypoints has been long lost, it is still possible to use the pathways that are already in place. A Portal opened by means of this spell will always take the caster to the location of the nearest gate and remain open long enough to bring the caster back to his point of origin. The Tristram Cathedral is built upon the remains of a Horadrim monastery, and has at least in the past harbored a portal gateway nearby.