What is Warhammer 40k?
The rulebook is available by itself or along with a starter kit. This almost 500 page book is not completely up to date, but it will cover the basics, which are still the same.
Supplements to the rulebook are called "Codexes". For each army or group their is a codex, which contains the most up to date information available for that army. Codexes not only give you army information, but painting tips, color schemes, and tactics. They are available at GW stores, or at their online store at the link below. 
How Do I Learn?
Warhammer 40k is...
A table-top wargame that takes place 40,000 years in the future. 11 armies are available to fight and attain victory on the table. These are the Space Marines (SM), the Imperial Guard (IG), the Sisters of Battle (SoB), the Deamonhunters (DH), the Eldar (EL), the Dark Eldar (DE), the Tau, the Necrons (NE), the Chaos (CH), the Tyranids (Nids), and Orks.
Each army is then divided further. For example: the SM are broken down into chapters, the DE are broken into Kabals, the EL are broken into craftworlds, the Tyranids are broken into Hive Minds, the Chaos are also broken into chapters, and the Orks are broken into clans.
Beyond that, there are 3 large sides of the 40k armies.
One the side of the Imperium are SM, IG, SoB, and DH. On the Evil side are Chaos, and the DE. The DE however are evil to everyone, including Chaos, and so they are not allied, but totally just... EVIL. The Third side is the out-for-themselves side. This side includes everything not already mentioned above, but most especially the Tyranids, who would rather eat everything then become nice.