Sailaway21 has it partly right...
Spill pipe; leads from the deck down into the Chain locker.
Hawse pipe; a fairlead that leads from the deck down through the side of the vessel and overboard.
Now pending on the size of the spill pipe, I just stuffed a rag down it and covered the rag with canned styrofoam(sp?). And it pops out easily when you drop the hook.
I have seen canvas truncated cones, split to wrap around the chain. The cones were stuffed with rags or foam in order for them to hold their shape. A lanyard was attached to keep it from going overboard or being pushed down into the chain locker.
Then some yachts have fancy bronze caps over their spill pipes... and you get to polish them every morning before you have breakfast.
A routine job for the deck hand.
For the Hawse pipe we used a 'Buckler plate'
also known as a Jackass cover This stops the water from coming up the Hawse pipe and unto the deck.
But it can be a bit moot when you are burying your bow into the seas...