PangaeaData.AI interview question

What is the difference between a decoder and encoder and how are they connected?