Why is there a clock in my arduino?
Why is there a clock in my arduino?


Because that is how computers and microcontrollers, etc, work.


  With a 16mhz clock, each line of my program will take 1/16000000 second, right?


No.


  even a very very big line will only take 1/16000000 of a second ?


No.

The clock defines at what speed the machine code instructions are fetched from memory and executed. Most instructions take 1 clock cycle, but some take more.

One line of C code may be compiled into any number of assembly instructions, which then get converted into machine code (raw numbers).  That could be anywhere from 1 assembly instruction to thousands of assembly instructions, depending on what the line does.


  With a 8mhz clock, each line will take the double of the time, right? So the whole "main loop" will take the double time too, right?


Every operation in the chip is governed by the clock. If the clock is half the speed the chip is running at half the speed, so every operation will take twice as long, yes.