Pistons in 2 & 4-stroke diesel engines can change direction hundreds of times a second and are exposed to extremes of heat and pressure. Modern pistons are made of aluminium alloys.
Diesels using direct injection have an almost flat surface on the cylinder head and almost all of the combustion chamber is in the head of the piston.
Engines with indirect injection usually have pistons with a flatter head, and sometimes with small indentations.
When the piston is fitted, there must not be too much clearance. It has to seal in the high pressures and temperatures generated by combustion. This is done by piston rings - held in grooves in the side of the piston.
The top two are called compression rings. The lower ring is an oil control ring. It scrapes excess oil off the lower cylinder walls.