Wipro Interview Question

How does a relay work?