The thermoelectric effect involves:
When using electricity to create a temperature difference, it's more specifically called the Peltier effect. The temperature difference is most often used to do cooling of something like water or food. The commercially available modules for doing this are called Peltier modules or thermoelectric coolers (TEC). One is shown in the photo the right.
When using a temperature difference to generate electricity, it's more specifically called the Seebeck effect. The commercailly available modules for doing this are are called thermoelectric generators (TEG). They look similar to the photo on the right.
Note that the efficiency of these is very low, around 5%. There is some work on much higher efficiency ones but they have yet to make it to market.
Doing cooling with a Peltier module/thermoelectric cooler (TEC)
As shown in the photos below, when you apply electricity to the module, heat is taken from one side and transferred to the other side. Whatever is in contact with the cooling side will get colder. The module shown here for doing the cooling is a commercially manfuactured one and is referred to as a Peltier module or thermoelectric cooler (TEC).
However, you do need some way to remove the heat from the hot side otherwise it will just accumulate and the whole thing will heat up. One way of doing this is with a heat sink and a fan, as shown below. The hot side of the module is solidly attached to the heat sink, preferably with thermal paste between them to aid in heat transfer. To further help, the fan is attached to the heat sink to suck air through the heat sink and away. As the air passes over the heat sink's fins, it will take the heat away from the fins.
To demonstrate this cooling, I arranged the thermoelectric cooling module as shown below with the module facing up and ample room below the fan for air to flow away. I then put some water on the module and after around 3 minutes the water had turned to ice.
Video - Peltier Module Cooling - The Peltier Effect
The following video shows the ice making demonstration talked about above. It also shows where I got my Peltier module and the electronics from as well as shows some efficiency testing.