Writing that you have a switch similar to an unclear photograph is not sufficient information for me.
Is your switch SPST? SPDT? Something else? Is there a center position? What type of Arduino do you have?
Let us suppose that you have pin 2 available on your Arduino. Then the general idea is:
A) Connect one side of the switch to ground.
B) Connect the other side of the switch to pin 2 on your Arduino.
C) Put the line
pinMode(2, INPUT_PULLUP);
in the setup() function.
D) Put the line
int switchValue = digitalRead(2);
in the loop() function. If switchValue has the value HIGH, then the switch is open (off). If switchValue has the value LOW, then the switch is closed (on).
Take a look at some of the examples available in the Arduino IDE. Learn from them.