Relays are electromechanical devices utilized to control electrical circuits by opening or closing a terminal based on an input signal. Its construction typically involves a coil, a set of terminals, and a mechanical armature. When power is applied to the coil, it creates a magnetic field that attracts the armature, causing the contacts to engage.