Short answer
Once the piece comes out of the bath, rinse it, scrub off the black residue, dry it right away and then oil and season it. Bare iron rusts quickly, so the order matters and the steps should not wait.
Rinse the electrolyte off
The solution is alkaline, so rinse the piece well under running water. Wear gloves while you handle it. A quick rinse removes most of the bath, but check the crevices and corners too.
Scrub off the residue
Electrolysis usually leaves a dark, powdery residue on the surface. Scrub it off with a brush, a nylon pad or a soft scrubber. Work in small areas and rinse as you go. Some people use a light pass of steel wool to clear stubborn spots, but avoid scratching the surface more than needed.
Check the piece as you go. Any spots that still look orange or reddish need more time in the bath or more scrubbing.
Dry it right away
Bare iron starts to rust within minutes to hours, especially in a damp kitchen. Dry the piece with a towel as soon as it is rinsed. Then warm it in a low oven for a short time to drive off the last moisture. Some guides describe a warm oven for about 15 minutes, but watch the piece and take it out once it looks dry.
Oil and season
While the piece is still warm, wipe a thin layer of oil over the whole surface, inside and out, and wipe off the excess. A pan with too much oil will become sticky. Then bake it upside down in a hot oven to build the seasoning. The full method is covered in the article on how to season a cast iron pan, and a stripped surface usually needs several passes before it cooks well.
Check the surface
After the first seasoning pass, check for leftover rust spots, dull patches or rough areas. Small rust spots can be scrubbed and treated again. If the surface is rough, expect a few more passes of thin oil and bake before you cook on it.
Keep it dry
A freshly stripped pan is more prone to rust than a seasoned one. Store it dry, and dry it fully after each wash. Ongoing protection against rust is covered in the article on how to keep cast iron from rusting again.
Where to read more
For the bath itself, read the article on how long to electrolysis cast iron. For the surface results, see the piece on whether electrolysis damages cast iron.