A binary star is two stars which orbit around each other. For each star, the other is its companion star. Many stars are part of a system with two or more stars. The brighter star is called the primary star, and the other is the secondary.

Binary stars are important in astrophysics because looking at their orbits allows scientists to find out their masses. From this is got the mass–luminosity relationship, and from this is got the masses of individual stars.

Binary stars are not the same as line-of-sight optical double stars, which look close together but are not connected by gravity. Optical double stars may actually be far apart in space, but binary stars are quite close together. The first person to discover and prove true binary stars was the Anglo-German astronomer William Herschel. He published the first catalogue of binary stars, and his son John Herschel found several thousand more and updated the catalogue. John Michell first suggested that double stars might be physically attached to each other when he argued in 1767 that the probability that a double star was due to a chance alignment was small.  William Herschel began observing double stars in 1779 and soon after that he published catalogs of about 700 double stars.

Modern definitions 
By the modern definition, the term binary star is generally restricted to pairs of stars which revolve around a common centre of mass. Binary stars which can be resolved with a telescope or interferometric methods are known as visual binaries. For most of the known visual binary stars one whole revolution (complete circle) has not been observed yet, they are seen to have travelled along a curved path or a partial arc.

Some stars appear to be in orbit around empty space, and appear not to have a companion. In this case, the companion star is either very small and faint, or it is a neutron star or a black hole. The best-known example of a star with an invisible companion is Cygnus X-1, in which the visible star's companion appears to be a black hole.

The more general term double star is used for pairs of stars which are seen to be close together in the sky. This distinction is rarely made in languages other than English. Double stars may be binary systems or may be merely two stars that appear to be close together in the sky but have vastly different true distances from the Sun. The latter are termed optical doubles or optical pairs.

Visual binaries 
A visual binary star is one for which the separation of the two stars can be seen with a telescope. The brighter star is the primary and the fainter star is the secondary. Visual binaries take a long time to orbit one another, in the area of hundreds or even thousands of years.

Spectroscopic binaries
A spectroscopic binary is one in which the two stars cannot be seen separately even with a telescope. They are very close together and move around each other very quickly, over a period of a few weeks or even a few days. However, they can be seen to be two separate stars by using a spectroscope, which is able to record the Doppler change in the color of the light sent out by stars moving quickly toward or away from the Earth.

Eclipsing binaries
Some spectroscopic binaries have an orbit that is edge-on to Earth. When this happens, the stars will take turns passing in front of and eclipsing the partner star, in what is called an eclipsing binary. In this case, the amount of light we see from the double dims slightly during the time one star is in front of the other.

Astrometric binaries
An astrometric binary is one where only one companion can be seen. For astrometric binaries fairly near the Earth (up to about 10 parsecs), it may be possible to see the visible companion "wobble" as it moves around its invisible companion. By making measurements over a long period of time, it may be possible to calculate the mass of the visible star and how long its orbit takes. This method is also used to detect the presence of large planets orbiting a star; as of 2007, over two hundred planets have been discovered in this way.

System properties 

Most binaries are detached binaries. Except for their gravitational pull on one another, they have no effect on each other.

Some binaries are so close to one another that one or both stars is able to pull material from the other. Contact binaries share the same stellar atmosphere, and as friction slows them over a long period, they may merge into one star. This violent event temporarily makes them shine more brightly, brighter than a nova but less bright than a supernova.

Formation
Though it could be possible that binary stars may form when one star passes very close to another, it is highly unlikely (since it would actually take three stars close to one another before two could join), and would occur only in places where stars are densely packed together. Our present understanding is that almost all binaries are formed together in the dense gas clouds where stars are born.

Runaways and novae
It is possible (though not likely) that a passing star will disrupt a binary system and provide enough gravitational force to split the binary. Such separated stars go on to live lives as ordinary single stars. Sometimes, though, enough gravitational force is involved that the two companions speed away from each other at great speeds, resulting in what is known as runaway stars.

Sometimes a star is in orbit around a white dwarf star. If it is large enough and close enough to the white dwarf, the dwarf may suck gasses from its companion's atmosphere. Over a period of time, a great deal of gas may collect on the white dwarf. As this gas is compacted by the white dwarf's gravity, it will eventually undergo nuclear fusion, resulting in a very bright outburst of light, known as a nova. In some cases, the white dwarf may gather so much gas that the explosion completely destroys it, in what is called a supernova. Such an event may also result in runaway stars, as the larger star no longer has a heavy companion which keeps it in orbit.

X - Ray Binaries 
X - Ray Binaries produce great amounts of X-ray radiation. They result from a massive star eating a less massive star. The lesser star becomes a donor and its matter is drained out and falls into the more massive (but more compact) star, the accretor. This releases high energy photons, for example in the X-Ray range of wavelengths. The X-Rays also come from the consumption of material on the surface of the more massive star in a process called thermonuclear burning. This can make 10 second bursts.

References

Other websites 

 Pictures of binaries at Hubblesite.org
 Chandra X-ray Observatory
 Binary Stars at Open Directory 
 An extensive simulation for the Algol system by North Carolina State University