The phrase implies someone is leaving with great urgency, as if their feet are on fire. When the bell rang, the students hotfooted it out of class.
Pro Tip 2/3
Casual Expression
'Hotfoot it' is casual and often used in informal conversations or storytelling. I'll just hotfoot it to the store, want anything?
Pro Tip 3/3
Idiomatic Usage
Understanding that 'hotfoot it' is an idiom means recognizing it's not meant to be taken literally. As soon as he saw the time, he hotfooted it to the meeting.