I can confirm now that your pipe is a pvc drain pipe.
The drain hose coming out of the washer, which goes into the drain box in the wall, is there to drain the water from wash and rinse cycles.
The drain pan and the little drain pipe in the floor are for emergencies, to catch and drain away any water that overflows from the washer, as yours apparently just did, which ruined your ceiling below.
Depending on the layout of your laundry room, the drain pan might just have a hole in the bottom, and the pan is placed over and sealed onto the pipe.
Or a short drain pipe might be plumbed into a hole in the side of the pan, and that short drain pipe would be connected to the drain pipe in the floor.
A good plumber will know how it all needs to be set up.
Meanwhile, your current metal pan looks like it is rusting out, so I would ask for a new pan.
Or maybe some kind of coating or rubber liner could be applied, to make it safe to use again.
This is all the info you need, call several plumbers for estimates, good luck.