Ethyne, C2H2, has a triple bond between the two carbon atoms. In the diagram each line represents one pair of shared electrons.
If you have read the ethene page, you will expect that ethyne is going to be more complicated than this simple structure suggests.
An orbital view of the bonding in ethyne
Ethyne is built from hydrogen atoms (1s1) and carbon atoms (1s22s22px12py1). The carbon atom does not have enough unpaired electrons to form four bonds (1 to the hydrogen and three to the other carbon), so it needs to promote one of the 2s2 pair into the empty 2pz orbital. This is exactly the same as happens whenever carbon forms bonds - whatever else it ends up joined to.
Each carbon is only joining to two other atoms rather than four (as in methane or ethane) or three (as in ethene) and so when the carbon atoms hybridise their outer orbitals before forming bonds, this time they only hybridise two of the orbitals. They use the 2s electron and one of the 2p electrons, but leave the other 2p electrons unchanged. The new hybrid orbitals formed are called sp1 hybrids (sometimes just sp hybrids), because they are made by an s orbital and a single p orbital reorganizing themselves.
What these look like in the atom (using the same color coding) is:
Notice that the two green lobes are two different hybrid orbitals - arranged as far apart from each other as possible. Do not confuse them with the shape of a p orbital. The two carbon atoms and two hydrogen atoms would look like this before they joined together:
The various atomic orbitals which are pointing towards each other now merge to give molecular orbitals, each containing a bonding pair of electrons. These are sigma bonds - just like those formed by end-to-end overlap of atomic orbitals in, say, ethane. The sigma bonds are shown as orange in the next diagram. The various p orbitals (now shown in slightly different reds to avoid confusion) are now close enough together that they overlap sideways.
Sideways overlap between the two sets of p orbitals produces two pi bonds - each similar to the pi bond found in, say, ethene. These pi bonds are at 90° to each other - one above and below the molecule, and the other in front of and behind the molecule. Notice the different shades of red for the two different pi bonds.
Jim Clark (Chemguide.co.uk)