Lava

"Today, lava spawns naturally in Minecraft in a whole bunch of places. The easiest location to find it is in the nether, where it forms vast seas below y-level 31. But it'll also spawn in the overworld, replacing air blocks in caves at the bottom of the world. Be very careful digging through rock below y-level 10 because it's very easy to find yourself face-to-face with a surprise lava pool that incinerates all the precious diamonds you just painstakingly collected. No point crying about it. The lava will just incinerate those tears too."

- Duncan Geere

Lava is a light-emitting fluid block.

Obtaining
Lava cannot be obtained as an item, but can be retrieved with a bucket.

Natural generation
Lava replaces air blocks generated in caves and ravines between level 1 and 10. Level 1 to 10 is considered "Lava Level" because this is where a player should be careful while mining. If the player creates a customized world without any caves or ravines, lava will not appear, and if lava lakes, strongholds and villages are disabled, the only source is the Nether. Lava will not replace air blocks inside abandoned mineshafts, dungeons or strongholds between level 1 and 10.

Lava can also occur as lava rivers from a single spring block, pouring down walls into pools. The spring block can be on the side of a cave, ravine, mineshaft or a stone cliff above ground.

Lava also spawns as lakes, which can be found at any elevation within any biome. Lava generates in customized worlds with lava oceans set to yes.

Furthermore, 2 blocks of lava can also be found in villages in blacksmiths' houses.

15 blocks of lava can be found in the End portal room of a stronghold: 3 along the left wall, 3 along the right wall, and 9 below the portal frame.

In the Nether, lava is extremely common, appearing more frequently than water in the Overworld. Seas of lava occur, with sea level at level 31, about a quarter of the total height of the Nether (as 63 is about a quarter the height of the Overworld). They extend down to about level 22 at the most. Lava also appears in single blocks inside the netherrack. In Console Edition, lava is a renewable resource, due to the fact that the player can reset the nether in the world options.

Lava cannot go anywhere with soul sand underneath it. It also generates in woodland mansions.

Burning


Most entities will take damage every half-second from being in contact with lava, and will also be set on fire. When in contact with lava, 300 Fireticks will be added instantly to the Firetimer of the entity/player. For every further tick the player is in contact with lava, 2 Fireticks will be added to the Timer. For example: 10 seconds in lava will cause a total amount of 700 Fireticks (35 seconds) where the player burns (300 initially + 400 Fireticks for 200 ticks being in the lava) or rather 500 Fireticks (25 seconds) left to burn when they leave the lava source. If the victim touches water or rain falls on it, the fire will be extinguished, but the lava will continue to damage them directly.

Nether mobs (which are immune to fire) will take no damage, nor will vex, nor will players or mobs affected by a potion of fire resistance.

The “embers” or “fireballs” which fly out of lava are purely decorative and do not cause fires or damage to entities. When it rains on lava, the rate at which the black "ember" particles appear increases dramatically.

A player in lava will last the following time, assuming the hunger bar is always full:
 * 3.5 seconds with full leather armor, no enchantments
 * 5 seconds with full gold armor, no enchantments
 * 5.5 seconds with full chain armor, no enchantments
 * 6.5 seconds with full iron armor, no enchantments
 * 14 seconds with full diamond armor, no enchantments

Fire spread
Lava can cause fires by turning air blocks to fire blocks:
 * in a 3×3 area right above the lava, and
 * in a 5×5 area above that.

In order for air above lava to turn to fire, a block adjacent to the air has to be flammable, or one of the wood-constructed non-flammable blocks. Since catching fire depends on air blocks, even torches or lava itself can prevent a flammable block from catching fire. Additionally, not all flammable or wood-constructed blocks can be ignited by lava.

Lava of any depth can start fires this way, whether or not it appears to have a current, but it must have settled into a stable  block. The  block will not cause fires.

Flow


Lava flows from "source blocks". Most streams or "lava-falls" come from a single source block, but lava lakes (including the "flood lava" in the bottom 10 layers) are composed entirely of source blocks. Only a source block can be captured with a bucket. Lava flows far more slowly than water, and sometimes sourceless lava flows will linger for a short time. In the Overworld, lava travels 3 blocks in any direction from a source block. Lava travels faster and further in the Nether than in the Overworld.

Lava which is flowing will destroy the following in its path: saplings, cobweb, tall grass, dead bush, wheat, flowers, mushrooms, snow on ground (but snow blocks are immune), lily pads, vines, levers, buttons, both types of torches, redstone, repeaters, end rods, and rails. Sugar canes hold back lava, but will disappear if the sugar cane's water source is destroyed by the lava.

Using a redstone wire, a one-block lava flow can be redirected by supplying power to the spring block, which will cause it to reset the flow towards the now-nearest terrain depression. This is further elaborated in this thread. It cannot, however, be reversed. This re-calculation is made because redstone wire when toggled changes the block from redstone(on), to redstone(off). Whenever a block updates on any side of lava, the lava re-calculates where to flow, but does not cut off its current direction of flow.

Flowing lava will not push entities, which is apparently intentional.

Lava and water
Water and lava can produce stone, cobblestone, or obsidian based on how they interact.

Light source
Lava blocks emit a light level of 15.

Other


Lava above a nontransparent block (does not include stairs, fences, and slabs) produces dripping particles on the underside of that block. These droplets are purely aesthetic, functioning identically to their water counterparts, except water particles are slightly faster.

Lava can set off tripwires, because they break placed string. It will only trigger it once.

Arrows shot by the player will only catch fire if shot in flowing lava and not still lava.

Lava Bucket
Lava source blocks can be collected and replaced using a bucket, in much the same way as water can.

A lava bucket can be used as a very efficient fuel. It has the longest burning value of 1000 seconds, compared to 800 seconds for a coal block (a lava bucket smelts 100 items, and a coal block smelts 80). After smelting starts, the lava bucket turns into an empty bucket.

ID
Lava spends most of its time as stationary, rather than 'flowing' – regardless of its level, or whether it contains a current downwards or to the side. When specifically triggered by a block update, lava will change to 'flowing', update its level, then change back to stationary. Lava springs are generated as flowing, and lava lakes are generated as stationary.

Block data
If bit 0x8 is set, this liquid is "falling" and only spreads downward. At this level, the lower bits are essentially ignored, since this block is then at its highest fluid level.

The lower three bits are the fluid block's level. 0x0 is the highest fluid level (not necessarily filling the block - this depends on the neighboring fluid blocks above each upper corner of the block). Data values increase as the fluid level of the block drops: 0x1 is next highest, 0x2 lower, on through 0x7, the lowest fluid level. Along a line on a flat plane, lava drops one level per meter in the nether and two everywhere else.

Trivia

 * The player can swim in lava, (If they are under the effects of a Fire Resistance Potion) although the swimming speed is noticeably slower. Additionally, flowing lava doesn't move players/mobs.
 * A water source block placed 1 block away upwards diagonally (but not through corners) from a lava block will first flow in the direction of the lava, then other directions facing away from the lava. This happens because water physics treat the place that lava occupies as empty, and try to flow to it. Once the water turns the lava into obsidian, the water physics update to flow in all directions. (The same thing happens with lava flowing over water.)
 * Although lava is a liquid, it is not possible to drown in lava. This applies to all mobs except squids.
 * However, it is still possible to suffocate in lava. This applies to all mobs including squids.
 * When the player is in a bed, they cannot be damaged by lava.
 * In console versions, lava cannot be placed near the spawn point.
 * If lava is changed to be transparent via Resource pack, it will not be transparent.
 * Lava does not prevent explosions from activating. Instead it has a very high blast resistance and absorbs regular explosions.