Take ethylene #H_2C=CH_2#; around each carbon atom there are 4 valence electrons. Two of these electrons combine with 2 hydrogen atoms (each with 1 electron) to form #2xxC-H# bonds.
Each carbon now has 2 electrons to play with. 2 of the electrons overlap to form a #C-C# #sigma# bond between the carbon nuclei. The remaining 2 electrons overlap above and below the #C-C# vector to form a #pi# bond. In the double bond, there is thus extra electron density so that the internuclear repulsion between the the carbon atoms is negated and a closer #C-C# separation can be achieved. #C-C# typically have #1.54xx10^-10*m# bond lengths; whereas #C=C# typically have #1.35xx10^-10*m# bond lengths.
Where a second #pi# bond may be formed, such as in acetylene, a #C-=C# bond length of #1.21xx10^-10*m# may be achieved.