At open circuit a temperature gradient maintained across the device creates a potential across its teminals proportional to the temperature ndifference. If teh temperature difference is maintained, and if the device is connected to an electrical load power is generated.
If, instead the device is connected to a DC source, heat will be absorbed to one end of the device, cooling itn while heat rejected at the other endn where the temperature rises. Reversing the current reverses the flow of heat. Therefore the module can generate electric power or, depending on how it is connected to external circuitry, heat or cool an object.
A common misconception is that the Peltier device somehow absorbs heat and carries it away, perhaps with the electric current. This simply not true. Yhe device only transfers or pumps heat from one of its sides to the opposite side. At the hot side, the heat must be removed through the use of a heat sink or by some other means. It is important to realise that the heat deliverd to the hot side of the device includes the pumped heat plus the electrical power dissipated within the device.