If the relay is attached parallel to a switch in some external device (such as a remote control), closing the relay is like closing the switch. BJTs are a very common type of transistor.