What is work of relay?

A relay is an electrical device that opens or closes in response to a small electrical current or voltage. This makes or breaks the connection in another device.