It can be a bit tricky, here are a couple of tips:
Use a lot less liquid in the blender than normal. Do batches if needed.
Vent the lid so the steam can escape. A lot of lids have a center piece that can come out. Using less liquid will stop stuff coming out the top.
As Ocaasi suggests, you can cover the open lid with a kitchen towel as you start to ensure there's no spray.
Start the blender slow and then speed it up. This may not work depending on how fast your slowest setting is. But once the vortex gets going, the liquid won't splash. It's only when the blades start that you have that issue. Slower start speed means less splash (a vita-mix can start very slowly and have no splash at all, great for hot liquids but the price tag is a bit high).
I but some cooled product in the blender. First, I start the blender on slow mode, with the lid on. Once it is running, I remove the lid and then slowly add the hot product, a little at a time (never from the hot pot), with the lid off. I can then slowly adjust the speed. I only fill the blender to 3/4 full and blend until I achieve the right consistency. Then I repeat the process beginning with the cool product first, and slowly adding the hot, repeating the same steps.