There are three ways in which heat can move: convection, conduction, and radiation. Each of these relate to a vacuum in its own way, so it's important to take account of all three when considering how heat moves (or doesn't move) in a vacuum.
At the molecular level, heat is the result of the energy that a substance possesses from the motion of its molecules. The faster the molecules move, the hotter the substance. In fact, at the raw physical level it makes more sense to think of a substance having internal energy, as opposed to heat, and consider heat only when that energy is transferred to another substance.
Conduction is normally what we think of as the transfer of heat. The fast moving molecules of the hot part of the substance collide with the slow moving particles of the cold part of the substance, and this causes them to speed up and become hotter. A clear example is a metal rod being heated at one end: conduction will cause the entire rod to become hot. Since there are no particles within a vacuum for the molecules of a substance to collide with, heat transfer via conduction is impossible through a perfect vacuum.
Convection occurs in a moving substance such as air or water. A source of heat (such as a heater in a home) heats the air around it and blows it out into the room. As it flows out into the room, it rises and pushes colder air down and back to the heater. This cool arm is warmed and the process repeats. Since there's no substance in a vacuum to move, heat transfer through a perfect vacuum via convection is impossible.
The spread of electromagnetic waves such as light can carry heat with them. For example, the heat of the sun gives off light. The light of the sun travels through space and hits the earth's atmosphere. Some of these light waves strike molecules of air and cause them to speed up. Since heat is just the motion of the molecules within a substance, this is the same as saying the air is heated. And, since electromagnetic waves are not impeded by a vacuum, heat can be transfer through a vacuum via radiation.