Molecules always vibrate, even (counterintuitively) at absolute zero temperature - a result of the uncertainty principle. When a molecule receives the appropriate amount of infrared energy, some of that energy is absorbed, and the absorbed energy is converted into kinetic energy. Which is to say, the the molecule vibrates faster. For molecules, only certain amounts of energy are allowed to be absorbed, and that allowed amount of energy depends on the structure of the molecules. Which is why infrared spectroscopy (analyzing which energies of light a certain molecule absorbs) can be used to understand molecular structure, or identify unknown molecules. The higher energy vibration after absorption of light does not persist indefinitely. Eventually the vibrating molecule sheds the excess energy and "slows down" back to a lower energy vibration, in a process liberating heat. Which is why infrared lamps can heat up, for example, food.