Above is a picture of a Nether portal with obsidian corners.
Creating a Nether Portal
A nether portal is built as a frame of obsidian (4×5 minimum and 23×23 maximum). Nether portals that are side by side can share obsidian blocks.
Once a nether portal frame is built, it is activated by fire placed inside the frame. This creates portal blocks inside the frame, resembling a vortex. The fire can be placed in any manner, including use of flint and steel or a fire charge, impact of a ghast or by a blaze fireball. A nether portal frame can be built in the End, but it cannot be lit/activated.
Behaviour of the Portal
When a player in the overworld or the Nether stands in a nether portal block for 4 seconds, the player is taken to the other dimension. The player can step out of a portal before it completes its animation to cancel the teleport. In Creative, there is no wait time so the player will immediately transfer between dimensions. If there is already an active portal within range (around 128 blocks) in the other world, the player will appear in that portal. Otherwise, a portal will be created at or near the corresponding coordinates. If a portal is deactivated, and the matching portal in the other dimension is used before it is re-activated, a new portal may be created (not if there is another, active portal within range). The usual case for this is a when the player’s Nether-side portal is deactivated by a ghast, and then the player dies in the Nether and then re-enters the Nether. However, multiple portals can be exploited to farm obsidian.
Entities can travel through portals, including mobs, thrown items, and even empty boats and minecarts. Storage minecarts and powered minecarts can pass through, but minecarts, boats, or horses with passengers (mob or player) cannot. Inter-dimensional railways are limited to cargo. If the chunk on the other side of the portal is not loaded, entities passing through (including projectiles) will effectively be held in suspended animation until the chunk is loaded.
Zombie pigmen have a chance to spawn on the bottom frame of the portal in the Overworld if any nether portal block above receives a block tick. They spawn twice as often on Normal difficulty as on Easy, and three times as often on Hard difficulty compared to Easy. No other mobs can be spawned by nether portals in this way, in any dimension.