The Spread of the Imperium of Man
The real reason the Imperium of Man has spread so far (relatively speaking, the Imperium only covers one quarter of the entire galaxy even in the 41st century) is because of several millennia of expansion, once during their Fusion Age of barely faster than light expansion for 14,000 years and then another 10,000 years of faster than light travel when Humanity first learned to skim the surface of the extra-dimensional region called the Immaterium.
Using the Immaterium, Humanity was now able to travel much farther and more accurately than it had ever before. This brought about the Age of Technology, where new technologies and social transformations spread Humanity everywhere their ships could reach. During this time, humanity had even come into contact with alien races and established treaties of non-aggression. These would eventually be destroyed with the coming of the Age of Strife in the 26th Millennium.
During the Age of Strife, Mankind's hubris brought about the creation of new weapons of war and technological transformation and that war created machines which began to attack the worlds of the Imperium. At the same time psychic abilities turned from myth to fact and psykers started appearing everywhere. The Fall of the Eldar and the coming of the Chaos Demons also took place at this time. For the next 15,000 years, the Galaxy as we knew it began to unravel and the Golden Age of Humanity was undone.
Humans continued to travel faster and faster using Navigators, psykers who could navigate through the Immaterium better than previous ships, and this ensured mankind would continue spreading through the stars. However, as the Chaos Gods formed and the Eldar retreated from Imperial Space, the Immaterium became unstable and more difficult to travel through. This began to slow the expansion of the Imperium and eventually would limit it size due to the new hazards of travel through it.
For 5,000 years the Immaterium could no longer be effectively used for long distance travel due to corruption caused by time spent there. The longer you were in the Immaterium, the more likely you were to get lost and be unable to return to the material universe. During this time, the federation of worlds of the Imperium collapsed as daemonic possession, planetary corruption and the failure of the economic systems of the empire took hold.
In the 30th Millennium, the Fall of the Eldar is complete and the Chaos Gods tear from their gap in the Universe and begin their war on the galaxy at large. The Adeptus Astartes are created and the Immortal Emperor of Man join the battle against Chaos. Unfortunately, one of the greatest of the Emperor's soldier's rebels and helps to create the Chaos Legions.
The great struggle ends with the Emperor encased in a life-support chamber using his incredible psychic might to create a beacon through the Immaterium called the Astronomicon. This beacon is now what Navigators use to travel through the Warp and has restored the ability of the Imperium of Man to travel during its troubled times of endless war.
By the 41st Millennium, the Imperium is embattled on all sides, and its expansion stopped by Orcs, their merciless extragalactic enemy, the Tyrannids, fleeing, despondent and dangerous Eldar, awakening and undying Necrons, and allied occasionally by the Tau, a young, energetic, technologically talented race that still believes in a "greater good."
Map of the Imperium of Man
(Open in a new tab to see it in far greater detail)
See Also:
In Warhammer 40000 are normal humans enhanced in any way?
How did mankind travel through the warp during the Great Crusade?