How to get the Arduino to close a circuit

What is the transistors role? Why can't I just use a relay?