Pistons in Minecraft are blocks that can push other blocks or pull them if they are a sticky piston. They are particularly useful with many big projects that use redstone. You will need a redstone power source to use them as well. They can be made in any version of Minecraft. Here is how to craft a piston.
Before you can make a piston, you will need to have the resources for it. You will need three of any wooden planks (oak, spruce, birch, jungle, acacia, dark oak, crimson, or warped), an iron ingot, one redstone dust, and four cobblestone blocks. If you want to make a sticky piston, you will need one slime block per piston.
Most of these items are relatively easy to find. The wooden planks are found by breaking down a block from a tree and crafting that into four planks. Cobblestone is made when you break down a stone block with a pickaxe that does not have Silk Touch. Iron ingots are made from smelting iron ore. Finally, redstone dust is gathered from breaking down a redstone ore block with an iron pickaxe or better.
The slime can be a little tougher to find. The slime mob will spawn in specific conditions in the regular world. Sometimes you can get lucky and find them in swamp biomes at night during a full moon, but most will appear underground in designated slime chunks that you will not be able to see. When underground, they will only spawn below level 40 and appear 24 blocks away from any player. If there are no players within 32 blocks of a slime, it will despawn.
There are ways to make a room dedicated to spawning slime, but if you are trying to find one via the regular route, you will need to pay attention to their bouncing sound. Kill the slime mob, and it will drop a slime ball.
The piston and sticky piston recipe
Now that you have all your resources find a crafting table. On Bedrock, you can find the piston in the mechanical tab. Once you make that, you can then add the slime to make a sticky piston. In Java, the piston recipe will require you to put the three planks in the top three slots, the four cobblestones in the slots below the planks on the left and right, the iron ingot in the middle, and the redstone dust in the bottom middle slot.
Move your cursor to the slot on the right and move it to your inventory, and you have a piston. If you want a sticky piston, put the piston in the middle slot and the slime ball in the top middle slot.