What are the characteristic properties of a piston by definition?
Quite simply put: A piston plugs a hole.
Wikipedia says:
It is the moving component that is contained by a cylinder and is made gas-tight by piston rings.
(Note: I would disagree in the wiki assessment only to say it is sealed tight by sealing rings. Not all pistons have rings attached to them, as I'll explain.)
In your example, the similarity stops there.
What is the difference between the two types of pistons?
Realistically, a piston can be made of any material so long as it does the job at hand. Pistons used in modern internal combustion engines are most likely made of cast hypereutectic (over saturation of silicon content) aluminum. This is due to their light weight and strength to weight ratio. For more heavy duty applications, forged aluminum might be used. Forged aluminum is more resistant to detonation which might occur under high cylinder pressure. Hypereutectic pistons are shatter prone under high stress. Older vehicles may have used cast iron pistons, back when refining aluminum was very expensive.
A brake piston, on the other hand, can be made of plastic, aluminum, or chrome-plated steel. (Most I've seen are the latter.) Again, all it does is plug a hole.
A brake piston is smooth on the outside radius. It is sealed from the inside of the caliper to hold the brake fluid in. The top of the brake caliper piston (the side which brake fluid acts upon) is relatively flat. This is to ensure the brake fluid is acting upon the piston equally across the entire face.
An engine piston has ring groves machined into them. These ring groves provide space for piston rings which seals the cylinder almost completely tight, with two compression rings to provide the sealing (some truck applications use three sealing rings). There is a third ring grove at the bottom of the piston which provides space for an oil control set of rings. This helps scrape oil off of the cylinder walls, forcing it back down into the bottom to the oil pan. The face of the engine piston can be of many different varieties. Some have indentations to allow the valves a place to be (instead of hitting the piston!). There can also be crowns for higher compression and depressions for lower compression.