Arduino - first project and troubleshooting

These days I have been interested in making objects move by themselves. Have I been practicing magic with Harry Potter? Nah, just kidding. :-)

The Arduino is just a small blue board with some sensors and pins attached to it. (I'm sorry for using the word "just" because it must be very complicated inside.) I've been working on the very first and basic project - making LED lights blink.

This is a simplified picture of how I put the LEDs on the breadboard and connected them with the Arduino.
Although I know a bit of C++, I watched some videos and wrote the "model" code. I hope sometime later I would be able to write my own Arduino code and make cool stuff happen.
But when I compiled, orange error lines that read "not in sync: resp=0x00" appeared. It seemed that my Arduino didn't receive any of the code I wrote. I searched the internet and many people seemed to be having problems with this notorious error. My problem was that the Arduino was attached to the wrong port.
To change the port : Open the Arduino software, go to Tools->Serial Port and choose the other COM (e.g. COM1, COM3)

So here's how the LEDs blinked after successfully compiling the code.