How can I use a toggle switch with Arduino ?

What happens when you connect this circuit and toggle the switch?

+5v (Arduino) -> Switch -> LED -> 330 Ohm resistor -> Gnd (Arduno)