Identifying the star HDE226868 as the optical counterpart to the astronomical X-ray source, Cygnus X-1, was the first step in identifying it as a black hole.
When first discovered, Cygnus X-1 was not a black hole candidate, but it was still interesting to astronomers because the X-ray emission varied. The variations are fast enough that the X-ray source must be smaller than 300 km. Either a neutron star or a black hole would qualify, but not any other type of star.
More importantly, these variations led to an accurate position. In 1971 two independent teams of radio astronomers discovered variable radio emission from within the possible range of positions for Cygnus X-1. The measured changes in the radio brightness occurred at the same time as changes in the X-ray brightness. With the more accurate radio positions, astronomers could finally pin down the location of Cygnus X-1 in the sky. It corresponded to a previously cataloged blue supergiant star, HDE 226868.
HDE 226868 is a catalog number in the Henry Draper Extension catalog. As a 9th magnitude star, it is about 15 to 20 times too faint to be visible to the naked eye. However its position in the sky is very close to the naked eye star, Eta Cygni. HDE 226868 is about the diameter of the full moon east and just a bit north of Eta Cygni. Although not visible with the naked eye, it is visible in many amateur sized astronomical telescopes.
After identifying HDE 226868 as the optical counterpart to Cygnus X-1, astronomers concentrated on optical studies of this star. Its optical spectrum reveals that HDE 226868 is a hot supergiant star on the border between an O and B spectral class. about 7000 to 8000 light years away. More importantly, the Doppler shifts in the spectra show that it is alternately approaching and receding from us with a 5.6 day period. HDE 226868 is orbiting something. Normally in such cases, astronomers observe two sets of spectral lines. The stars won't have the same spectra, so they can be distinguished from each other. When one set of spectral lines is approaching, the other is receding. However in the case of HD 226868 we see only one set of spectral lines. Hence it is orbiting an invisible companion.
The X-ray flickering that helped us identify HDE 226868 as the optical counterpart to Cygnus X-1 also provide another useful clue. Nothing can move faster than the speed of light. This speed limits how fast a celestial (or any other) object can change its brightness because the signal to brighten or dim can only travel across the object at most at the speed of light. The rate at which the X-rays from Cygnus X-1 flicker tell us that the X-ray source must be smaller than 300 km in size.
This size is too small for a normal star or even a white dwarf, but the unseen companion could be either a neutron star or a black hole. Hence, not all invisible companions are black holes.
To understand why astronomers think that the unseen companion to HDE 226868 is a black hole, we need to know something about black holes. What exactly is a black hole?
A black hole is a dead massive star that has collapsed to the point that its escape velocity exceeds the speed of light. Hence nothing can escape. If a neutron star has a mass greater than somewhere between 2 and 3 times the mass of the Sun, it will collapse into a black hole.
Thorne, K., Black Holes & Time Warps Einstein's Outrageous Legacy, Norton, 1994.