Heat is infrared. Light.
All light heats up anything that absorbs it. This includes infrared, but it also includes visible light, microwaves, radio waves, etc. You can get a nasty burn from putting your hand near a live radio transmitter antenna, for example, even though it's emitting in RF, not infrared.
In addition, all physical objects glow with a light that is determined by their temperature. This includes your body. You are, right now, emitting light. As it happens, because of your body's temperature, that light is mostly in the infrared.
Why do kids' science books leave you with the impression that "heat is infrared"? Because you can see body heat with an infrared camera. Infrared is light that you can't see with your eyes — but with the right tool, you can use to see body heat. This rounds off to "heat is infrared".
Heat is not infrared. All physical objects emit light; objects around human body temperature glow mostly in the infrared; which we can't see with our eyes, but can see with scientific instruments. And when an object absorbs light (including infrared), it gets hotter.