A piston converts a redstone signal into block movement. A normal piston pushes blocks; a sticky piston can also pull a movable block back when it retracts.
The piston recipe uses three planks, four cobblestone, one iron ingot and one redstone dust. In the crafting table, fill the top row with planks, put iron in the center and redstone below it, and fill the remaining spaces with cobblestone. This produces one piston.
Combining a piston with a slimeball produces the sticky variant. Its adhesive face distinguishes it from the ordinary piston.
Applying power extends the head one block in the direction it faces. The push limit is twelve blocks. When the power is removed, the head retracts; a normal piston leaves the pushed block in its new position.
A sticky piston can return a movable block with its retracting head. Slime and honey blocks can connect larger assemblies, but the twelve-block limit still constrains the movement. Some blocks, including bedrock and obsidian, cannot be moved.
Pistons are used in concealed doors, traps and farm mechanisms that change water flow or harvest crops. Sticky pistons also allow decorative blocks to be exchanged or a chest to be concealed. These uses require a suitable power circuit and movable blocks.
Java supports quasi-connectivity, whereas Bedrock does not. Consequently, some indirect-power arrangements and block-update-detector circuits cannot be copied unchanged between editions.
Short pulses also matter: Microsoft's edition comparison notes that Bedrock pistons do not leave blocks behind after a one-tick pulse. Designs that depend on Java's short-pulse behavior need an edition-specific alternative. This article gives no universal timing blueprint.