wh40k was created in 1987 by the british company Games Workshop as a tabletop game, where miniature armies battle each other following preset rules. In the years, it has expanded beyond the tabletop world to become one of the most influencing scifi setting of the last 30 years with videogames, comics and specially books (the 40k library now contain like 100+ books)
To make you understand its influence, you will find lot of 40k elements in Gears of War, Mass Effect, Warcraft, Starcraft, Halo, and many others games. Starcraft specially has basically copied the concept for Terran Marines, Protoss and Zerg from 40k's Spacemarines, Eldar and Tyranid
to give you an idea of the thematics of this universe i think the best way is to quote its main motto:
IN THE GRIM DARKNESS OF THE FAR FUTURE THERE IS ONLY WAR
"It is the 41st Millennium. For more than a hundred centuries the Emperor of Mankind has sat immobile on the Golden Throne of Earth. He is the master of mankind by the will of the gods and master of a million worlds by the might of his inexhaustible armies. He is a rotting carcass writhing invisibly with power from the Dark Age of Technology. He is the Carrion Lord of the vast Imperium of Man for whom a thousand souls are sacrificed every day so that he may never truly die.Yet even in his deathless state, the Emperor continues his eternal vigilance. Mighty battlefleets cross the daemon-infested miasma of the Warp, the only route between distant stars, their way lit by the Astronomican, the psychic manifestation of the Emperor's will. Vast armies give battle in His name on uncounted worlds. Greatest amongst his soldiers are the Adeptus Astartes, the Space Marines, bio-engineered super-warriors. Their comrades in arms are legion: the Imperial Guard and countless planetary defence forces, the ever-vigilant Inquisition and the tech-priests of the Adeptus Mechanicus to name only a few. But for all their multitudes, they are barely enough to hold off the ever-present threat to humanity from aliens, heretics, mutants -- and far, far worse. To be a man in such times is to be one amongst untold billions. It is to live in the cruelest and most bloody regime imaginable. These are the tales of those times. Forget the power of technology and science, for so much has been forgotten, never to be relearned. Forget the promise of progress and understanding, for in the grim dark future there is only war. There is no peace amongst the stars, only an eternity of carnage and slaughter, and the laughter of thirsting gods."
This is the very first thing you have to understand about this world....there is no good guy. And when i say it, i mean it. This is the thing that makes wh40k so unique. Humanity is just the "lesser evil" of a universe filled with insane, demonic and genocidal races dedicated only to the annihilation of each other. The Imperium of Man is a dictatorial, xenophobic, militaristic theocracy with the declared intent to eradicate the entire galaxy of any non-human being fighting a constant all out war from over 10000 years with thousands of conflicts at any moment.
Physical and psychik torture, mass executions, total and brutal repression of any act of dissent are standard procedure in the Imperium. Every protest, act of dissent or any hint of atheism or different religious doctrine is brutally repressed in mercyless crusades. Entire worlds can be judged heretical and be obliterated from orbit (they even have a name for this operation: Exterminatus. Videolink under here)
The same is considered any peaceful act of cooperation with alien races
The entire human society is built around it's constant, neverending militaristic efford to survive against the extremely hostile universe they live in, with the fanatic faith in the God-Emperor as the only social and psychological force that keep the trillions of humans to endure against all odds
The major threat in this universe, are the forces of the Warp. The Warp is a parallel dimension where thoughts and emotions of sentient beings take shape and form. This is the realm of the mind, different in many ways to the material universe. Those gifted with psychic abilities can draw energy from this realm to achive many powers. Telekhinesis, mindreading, prediction of the future or the ability to shoot warpfire or lightning are some of their powers. This is also the dimension starship use to make Faster Than Light travels
but it is also the realm of the demons of Chaos. Entities who thirst for our emotions and souls. The 4 gods of Chaos are the rulers of this realm, acting at any moment to corrupt every living being to their wishes
40k history spams many millennia with the Emperor of Mankind as its central figure, and it's divided in "ages"
from our time to 15th millennium it's called the Age of Progress. Almost no information remain but it's the age where technology started to be learned and limited spaceflight was avaible
The Dark Age of Technology is the golden age of humanity and goes from M15 to M25. This is the age were humanity progressed like never before, spreading among the stars with countless colonies. All technological discoveries were shared in a galaxywide database called the Standard Template Construct so that any colony could learn to build anything they wanted. It is said the the tech level was becoming so high that it started to resemble magic. At the time, only the Eldar empire had any possibility to be a threat, but it had already started its slow decline torward destruction (ill tell you more later)
The Age of Strife, going from M25 to M30. Humanity age of despair. In the matter of few centuries all humanity had achived was destroyed by the combination of different events. Humanity greatest creation, the Men of Iron (sentient robots) rebelled against their creators and started a war that lasted for over a century. In the end humanity won, but dramatically crippled. At the same time, the first 3 gods of chaos, Khorne, Nurgle and Tzeench, gained full self existence. Their coalescence caused many massive warpstorms that made interstellar flight or comunication impossible. Most world were cut off from the rest of humanity. Colonies depending from other worlds were isolated, easy prey for alien races. Psykers started to be born in greater numbers, but without the knowledge of how to control their power, they fell prey to the Warp demons. The entire human society collapsed, regressing millennia. The Standard Template Construct was almost entirely lost, and technological knowledge slowly disappeared without the tools to understand how it worked
Millennium 30th: This is the most crucial period in recorded history. The Eldar race decadence caused the single most destructive event of the galaxy. Without any serious threat to their supremacy, and with all material needs fulfilled, the Eldar had long ago started to be a race who lived just to pursuit progress and enjoy life. They became a race of artists, scientists and researchers. However, with a lifespam of over 1000 years, some of them started to grow bored and began to pursuit more dungerous and twisted wishes to find some thrilling in their long life. Things got worse and worse until most of the Eldar population had become an hedoistic race, dedicated to pursuit any sensation and instinct they wanted, physical and psychical, including murdering or torture. Many were disgusted by this and fled to the outer worlds of the empire. Others had visions of the impending destruction of their race and tried to change this cursed path. All for nothing. All this twisted sensations, thoughts and emotions gathered together in the Warp. The 4th god of Chaos, Slaanesh, came to existence. Its birthcry was so powerful it ripped apart reality, creating a "hole" between real space and the warp, engulfing the entire Eldar empire in what is known as the Eye of Terror, a region of space where the 2 universes merge. The souls of almost the entire Eldar population was eaten by "She who Thirsts". Today, the Eldar race is composed of a small fraction of the survivors, living in planedsize ships called Craftworld, and fighting to avoid extinction, knowing that the day they die, their soul will be devoured by Slaanesh
The creation of the Eye of Terror had also another effect. The huge warpstorms that made interstellar travel impossible disappeared. This is when the Emperor of Mankind emerged for the first time
Born in central Anatolia in 6000B.C. as an immortal psyker with immense power, he had guided and influenced humanity from the shadows since then. Never taking direct control until now (it is possible that Jesus, Caesar and many other historical figures were him). He conquered the various factions of the devastated earth, and started to build his great Imperium. Taking his own genetic code, he created 20 genetically engeneered superhumans. They were the 20 Primarch, incredibly powerful and inteligent men. His generals to guide his armies. The gods of Chaos however interfered, seeing the Emperor and his plan for an ordered, atheist galaxy as an anathema for their existence and scattered the still infant Primarchs all over the galaxy. The Emperor used the Primarch genetic code as a template to create the 20 legions of Adeptus Astartes, commonly known and SpaceMarine. Genetically altered humans (much less than the primarchs tho), who became his elite army. He launched his crusade to unite again humanity lost colonies, peaceful if possible, or subjugating them.
The Primarchs were found one after the other, all of them had grown in different worlds all of them with their own story and background. They were put in control of the Spacemarines legion created from their genetic code and became in short time mythical figures for the entire Imperium population
This time was called the Great Crusade, a war efford that brought together hundreds of thousand of worlds, united under the same banner after 5000 dark years
With the crusade going strong, the Emperor retired to earth to complete an important project. He knew of the warp and his denizers, and wanted to free humanity from the need of it for FTL travel, A major turn point happened for this
Horus, the greatest of the Primarchs was declared Warmaster, and put in charge of the crusade
This is when things turned to bad
The Emperor had one, main goal to achive. He wanted to free humanity from the chains of religion, faith and superstition. He wanted to create a secular reign, where only reason and science guided humanity actions
Not everyone agreed tho. One of the Primarch, Lorgar, had grown up in a very religious world. Faith in divinity was his life, and he considered the Emperor a god. He even wrote a book about the Emperor called Lectio Divinitatus. At first, the Emperor tollerated his zeal. But when Lorgar's legion, called Word Bearers, started to became slow and inefficent in its military campaign because he was wasting resources in converting the population of the worlds, the Emperor lead an assemly of spacemarine and destroyed the capital of the religious planet of Khur, a planet dear to Lorgar and his legion. The entire Word Bearers Legion, 100,000 Space Marines strong, were ordered to assemble on the planet's surface, within sight of the smoldering ruins of the capital, where its Astartes were humiliated and rebuked by the Emperor himself, who psychically forced everyone, including Lorgar, to kneel before him, and explained to them that they had failed both him and humanity. Lorgar was stunned by his father's reproach and refusal to accept his worship
This was a shaking event for Lorgar. It was at this time that his closest friend Kor Phaeron, spoke to him about the Chaos Gods. Lost without his faith, Lorgar was easy prey of their temtation, embraced them with joy, with his entire legion and the worlds under his control
Even with his legion and entire starsystems ready to fight for him, alone he could not move against the Imperium. He needed to bring others under the power of Chaos and organized a trap for the Warmaster Horus
Horus was wounded by a cursed sword, and during his period of convalescence was corrupsed by the Chaos Gods
This was the beginning of the Horus Heresy, an event that has shaped the 40k universe like we know today
With Horus brilliant influence and manipulation, half of the Primarch fell under the power of chaos
Their first open act of rebellion was the "Drop Site Massacre". He sent 4 loyalist spacemarine legions to conquer the corrupted world of Istvaan V. When they made landfall, Horus army bombed the planet, killing dozen of thousands of Spacemarines. To their horror, the survivors were attacked by 3 more fellow legions starting a civil war that would obliterate trillions of beings
The culmination of the HH was the siege of Terra, where Horus' own legion and 3 more legions assaulted the throne world (the other 5, were devastating the galaxy). The loyalists resisted however, and when he learned that the Ultramarine legion, by far the strongest, was coming to help the loyal forces, Horus shut down his ship shield to bait the Emperor for a direct confrontation. The Emperor teleported together with the Primarch Sanguinius and an elite force of spacemarines to fight Horus and stop the war.
Separated during the fight, Sanguinius reached Horus first and fought him, but was easely overwhelmed by Horus. He died moments before the Emperor finally reached him. They fought, and Horus managed to mortally wound the Emperor before being obliterated by the Emperor's might
The dieng Emperor was brought back to the royal palace and interlinked to a life-sustaining machined called The Golden Throne.
After this event, the survivors of the civil war tried to keep the imperium together, but half millennium had to pass before any kind of stability was reached. The corrupted space marine legions fled into the Eye of Terror, and even now they still assault the Imperium
With the absence of the Emperor, the remaining primarchs lead the Imperium for a time, but 2 of them died, 3 of them disappeard into the warp, and one of them is suspended in a stasis field after being heavely wounded (the others died in the war)
Without this leading figures, the organization of the Imperium changed, and many organization rose to fulfil many works. One of them was the Inquisition, an secret organization to fight demons and Chaotic beings, another....was the Ecclesiarchy. As paradox to all this, the Emperor started to be revered as a god following the teaching of Lectio Divinitatus book Lorgar had written before turning to Chaos
Now, over 10000 years after the Horus Heresy, religious zeal has become THE major force that keep the Imperium together. Even technology itself is now a cult, with the belief that divine will is what makes machines to work. Rituals and prayers are done to make them work in an absurd dicotomy of senseless belief and technological supersition (for example, alien technology is considered impure and rarely studied to understand it). Real technological research is almost inexistent. With most of the new techs coming from the retrieving of Standard Templates from the old ages
This is the current 40k universe. A stagnant, dictatorial society besiege from all side by aliens and demonic forces where the population are not much more than "resources" for the war effords, and where "serving the Emperor" with your life is the only prospect in life for the poor majority
the only hope is the Emperor, who is, to this day, still linked to the Golden Throne. His devastated body is kept from "never truly die" by the sacrifice of 1000 psykers at day
This should give you a basic understanding about 40k universe
the next step, is either start reading the Horus Heresy books (Horus Rising, False Gods and Galaxy in Flame are the first 3 of the serie and focus on Horus himself), or go to
Warhammer 40000 wikior to
Lexicanumand waste and entire week on them
the pages you should read first are:
Imperium of Man
Emperor of Mankind
Space Marines + Primarchs
Horus Heresy
Chaos
Warp
Imperial Guard
Inquisition
Adeptus Mechanicus
Ecclesiarchy
the major xenos race (Eldar, Ork, Tyranid, Necrons, Tau, Dark Eldar)
technologies and weapons (Warp Travel, Gellar Field, Chainsword, Power weapons, Thunderhammer, Bolter, Lasgun/Lascanon, Plasma weapons, Melta weapoms, Shuriken weapons, Gauss weapons, Wraightbone, Necrodermis, Ceramite, Adamantium)
vehicles (Dreadnought, Land Raider, Baneblade, Thunderhawk, Titan, various class of space ships, Wraightlord, Wraightguard, Fire Prism, Wartrukk, Battlewagon, Necron Monolith)
Emperor's blood, i write too much when 40k is involved.....