Structure

Every specific group of blocks purposefully formed in Minecraft based on coding is part of a natural structure.

World Creation Menu
Generated structures is an option in the world creation menu, which is used to determine whether certain overworld structures generate in the world, such as villages, mineshafts, and dungeons.

List of structures
The following structures are enabled or disabled when the option is selected in the world creation menu:

Lake
Lakes are shallow and often small bodies of liquid. Water lakes, which are small pools of water springs, can generate above sea level or inside caverns. They can also generate isolated underground, connected to no other structures whatsoever. When in a winter biome, these small lakes are never initially frozen but will turn to ice if exposed. The lakes can also be composed of lava; however, lakes of lava are much rarer. Lava lakes found at the surface are surrounded by stone (which can be replaced by ore veins such as dirt, gravel and coal). Both types of lake generate with a small air pocket above them, which may result in floating sand, floating snow cover or even the top two-thirds of trees above the lake. Lava lakes may cause trees to burn away.

Buildings
Buildings are naturally generating structures that form above ground. They can contain valuable treasure, but traps and puzzles as well.

Upcoming structures
These structures have not been implemented into a full version yet but have appeared in snapshots of an upcoming version of Java Edition. (Refer to 1.14)

Technical details
Structures are generated for a given chunk after the terrain has been formed. The chunk format includes a tag called TerrainPopulated that indicates whether structures whose point of origin is in that chunk have been generated. If it is false or missing, they will be generated again. Structure generation is based on what is already in the chunk, so (for example) flagging a chunk that has already been populated for repopulation will approximately double the amount of ore in it.

When structures are generated, they can spill over into neighboring chunks that have been previously generated. Thus, a tree at the edge of the generated world (and probably only visible using external tools) may be overwritten by a lake before the player reaches it. It is also theoretically possible for two worlds generated with the same seed, from the same version of Minecraft, to differ slightly depending on the players' travel routes, because the order in which chunks are generated may determine which of two conflicting structures will overwrite or suppress the other.

Trivia

 * In previous versions, before snow cover was solid, a lava lake with floating snow cover above it could be a deadly trap before the snow melted.
 * The smallest possible fully-grown chorus tree (assuming the growth is not obstructed) would have 5 chorus plants.