In order to continue racing and running strong, proper recovery is crucial. If we don't recover well, our bodies will eventually shut down. They'll either get injured, or simply stop responding. You'll find yourself not being able to put in the effort required to run faster, to run farther, and to run longer. In particular, recovering from the beating that comes with running 26.2 miles might take several days, and even weeks. So after you've crossed the finished line, found your friends and family and given celebration hugs, downed your free banana and chocolate milk (which is all very much apart of both the mental and physical recovery process!), hit the showers.
It's important to not let your legs "get cold". You absolutely need to continue getting oxygen filled blood cells circulating through your legs but you DON'T want to do that by continuing running (at least, it's very, very likely that you don't want to do a cool down run - but there are always those people...). While you take a shower, alternate between cool and hot water on your legs, which will help promote blood circulation.
At this point, your "race stomach" has probably settled and you're likely feeling extremely hungry. You need food, now. Not just to satiate your hunger, but your muscles need protein and carbs and your brain needs fats. When we exercise hard, the fibers of our muscles rip apart. When they grow back together, they grow back stronger, which is how muscle is built. But they need protein and carbs in order to grow back, so you need to give it to them! Plus you have just burned so many calories that your brain and body is functioning at a deficit, and can't sustain it for much longer. Here's where you get that post-marathon treat that you thought about for the entire last 10k of the race.
Finally, continue stretching and foam rolling your legs. They're probably going to be very sore, but foam rolling helps loosen those tightened muscles. Loose muscles circulate blood flow easier, which like we said before, speeds up recovery. And if you're able, schedule a massage! And remember to SLOWLY get back to running over the next few days/weeks. Returning full-throttle will likely result in an injury.