The CPU contains a clock which is used to coordinate all of the computer's components. The clock sends out a regular electrical pulse which synchronises (keeps in time) all the components.
However, doubling the number of cores will not simply double a computer's speed. CPU cores have to communicate with each other through channels and this uses up some of the extra speed.