Despite a relative inferiority in technology compared to many alien navies in the Warhammer 40K universe (notably the Eldar Craft World's and the Necron Tomb Fleets) the Imperial Navy's large numbers and complex organizational infrastructure allow it to compete with the many alien races which threaten the Imperium.
While the Imperial Guard is responsible for the Imperium's ground forces, the Imperial Navy is responsible for the fleets of starships that are tasked with the defence of worlds, protection and escort of shipping routes, the transport of the Imperial Guard and the engagement of hostile ships (through fleet actions) and worlds (through bombardment and/or exterminatus).
During the Horus Heresy, however, it appeared that some regiments used the power at their disposal in order to forge empires for themselves in the fire of anarchy. This led to the eventual split between Guard and Navy, as the Guilliman Primarch of the Ultramarines Legion himself issued a decree ordering that spaceships may no longer be led by members of the former Imperial Army (now Imperial Guard).
A note on living quarters on large Imperial ships - for the top officer class (admirals, captains, commanders, first lieutenants, etc) onboard, an entire section of a large battleship's command deck may be divided into huge, luxurious staterooms, with vast bedrooms, offices and wardrobes, bathrooms and toilets mirroring those of an Imperial governor's palace, and even harems of concubines and handmaidens. Lower-class bridge officers and chief petty officers would have fairly large, moderately luxurious quarters, and the armsmen, mid-class crew and petty officers would all have decent accommodation, generally consisting of a sleeping area, chemical toilet and storage locker. However, the bottom-class conscripts and slave ratings would have little more than a flea-infested sleeping pallet and a single toilet between ten ratings.
A note on Imperial ship classes – while naval warships can be defined along a fairly limited number of classes based on weapon configurations approved by the Adeptus Mechanicus, the form these vessels takes varies widely throughout the Imperium. For example, a Lunar cruiser constructed above Cypra Mundi in Segmentum Obscuras may bear little resemblance to a Lunar cruiser constructed above Kar Durniash in Ultima Segmentum and even less so to a Lunar constructed among the vast shipyards of Mars. Nonetheless, they will all have roughly the same operating characteristics and weapon configuration, and thus can be easily serviced by any orbital facility throughout Imperial space.
Note there are also classes of battlecruisers. Although based on a hull-design that is similar to the regular cruisers, these ships are generally somewhat larger and more heavily armed, incorporating more advanced power distribution systems capable of supporting battleship-grade weaponry in a cruiser hull. A notable example is the Mars-class battlecruiser, with its fighter bays, broadside batteries, dorsal lance turrets and an immense, prow-mounted Nova Cannon capable of attacking targets at extremely long range.
A subset of the cruiser category are the light cruisers. These ships fall in size between cruisers and escorts, mixing the firepower and durability of the former with the speed and manoeuvrability of the latter. The Dauntless is a very common light cruiser class in the Imperial Navy. Extremely self-sufficient, it is fast and has enough firepower to be a threat to both escorts and capital ships. There are other classes in common use in the Imperial Navy, most notably the Endeavour class, which serves in varied forms and hull types throughout the Imperium. Light cruisers are a fairly common ship class, for they are relatively simple to construct for being a capital ship, and they are uniquely suited for reconnaissance patrols and for making a presence where their speed and maneuverability are an advantage, and where having a larger number of smaller hulls allows the Navy to monitor a wider area of space.
In turn, each Segmentum is divided into "sectors", regions of space that are generally cube-shaped and contain 8 million cubic light years of space. These sectors contain multiple sub-sectors, collections of star systems no more than twenty light years in radius. The ships of each Segmentum are divided amongst the sectors. These Battlefleets are assigned the task of safeguarding the sector they are assigned to, each Battlefleet is generally named after the sector it is assigned to (Battlefleet Gothic is located in the Gothic sector, Battlefleet Cadia is located in the Cadian sector, etc).
Each Battlefleet is assigned a number of cruisers and battleships, usually between fifty and seventy-five vessels. The Battlefleets are also assigned multiple squadrons of escort starships, and is also in command of a large number of transports, messenger craft, orbital defences, space platforms and system patrol vessels. The ships of a Battlefleet must constantly patrol their sector and fulfil a variety of roles; protect merchant shipping from pirates, transport Imperial Guard regiments to warzones, escort Adeptus Mechanicus Explorator fleets and provide orbital support for invading or defending armies.
Because of the vast space that requires policing, the Battlefleet is normally split into detachments consisting of one or two cruisers, accompanied by a squadron of escorts. If a particular situation is more than a detachment can handle, additional detachments are called in to reinforce.
On occasion, a Battlefleet can be formed to operate in a smaller area. Battlefleet Armageddon is assigned solely to the Armageddon sub-sector, and, prior to the Third War for Armageddon, was made up of four battleships, twenty-seven cruisers and thirty six squadrons of escorts. Battlefleet Solar is assigned specifically to the Solar System, and is primarily charged with defending the two holy worlds of Terra and Mars.
The Fury Interceptor is the most common starfighter used by the Imperial Navy for space combat. With some variants reaching 60 to 70 metres in length, the Fury is significantly larger than most atmospheric fighters, and carries a pilot, navigator and gunner. On occasion, an Astropath psyker will also be aboard, to provide greater communications capability. The Fury's reinforced hull contains an extensive network of circuitry and life-support systems, and even has a small chemical toilet and sleeping compartment for the crew. Furies are normally equipped with multiple forward-firing banks of lascannons and anti-starfighter missiles. An average carrier can carry upwards 2 thousand Furies (although most will carry less as to increase their capacity to carry more Starhawks and Atmospheric craft), split into fighter wings of roughly 15 interceptors each.
Starhawk bombers are larger, slower craft, designed to carry a heavy payload of plasma bombs and armour piercing missiles for use against enemy capital ships. Crewed by a pilot, co-pilot, tech-priest (plus acolytes), various turret gunners and a logistics officer, a standard Starhawk features limited sleeping quarters, chemical toilets and even an automated medical unit inside its hull. Armed with a multitude of short-range turret-mounted defence weapons, used to fend off enemy starfighters, a lone Starhawk can wreak havoc among enemy fighter squadrons before swooping in to deliver a crippling missile strike on an enemy capital ship. On rare occasions, Starhawks can be modified to carry and launch a very small number of anti-starship torpedoes. A standard Carrier can carry between 1-2 thousand Starhawks, split into bomber wings of about 10 starbombers each. There is a fan-created version, the Thunderstrike, with a 24-shot rotary missile launcher. It also has a modified cockpit and upgraded sensors. The Thunderstrike (or 'Thud' to crews) is about 20 meters long.
For atmospheric fighter combat, the two workhorses of the Imperial Navy are the Lightning strike fighters and the Thunderbolt heavy fighter. The Lightning is the faster and more manoeuvrable of the two, but cannot carry as many weapons as the Thunderbolt, and are considerably lighter armoured. Lightnings are often used as reconnaissance aircraft and interceptors, while Thunderbolts are mainly assigned to an air superiority role. Both are equipped with vector-thrust capability.
Marauder bombers are huge aircraft, capable of carrying 10,000 kilograms of ordnance. Each Marauder possesses a massive bomb bay and missile racks along the wings, along with a pair of lascannons and two pairs of heavy bolters for defense against enemy fighters. Marauders were the Imperial Navy's original space-borne bomber craft before their replacement by the equally large, but more advanced and heavily armed Starhawk bomber. The Marauder is also equipped with vector-thrust.
For close support, the Imperial Navy has access to Valkyrie transports and the Vulture gunship. These aircraft are not true flight craft, instead using vectored thrust to travel quickly at low altitudes. Unlike most Navy aircraft, they are sometimes directly assigned to specialised Imperial Guard regiments, such as the Elysian Drop Troopers.
Lances are energy weapons of extreme power. Usually mounted in large and heavily armoured turrets, lances use triple or even quad energy projectors to focus its energy into a concentrated beam, capable of burning through even the most armoured hull and cutting smaller vessels in half. These batteries have been described in various sources as being able to "level continents."
Torpedoes are long-range missiles carried by many Imperial Navy vessels. From ~60 feet (on destroyers) to ~200 feet (on cruisers) to ~300 feet (on battleships) in length, these weapons are powered by a plasma reactor which also doubles as its warhead. Once launched, the plasma drive propels the torpedo towards its target, whilst starting an energy build-up that will detonate the projectile once it reaches its target. Most torpedoes only have limited detection capabilities and will not track and engage its target unless its passes within a few thousand kilometres of the target vessel. Unlike weapons batteries and lances, torpedoes cannot be deflected by a ship's shields - most shields intercept incoming fire based on its speed. Torpedoes travel slow enough (relatively speaking) that shields will not intercept them and they can pass through these powerful energy barriers unimpeded.
Nova Cannons are huge weapons. Normally mounted in the prow of the ship so that the ship's engines can compensate for the recoil, these guns use gravimetric impellers to propel a projectile close to the speed of light. After reaching a preset distance, the projectile implodes with a force potent enough to cripple most vessels and/or damage several at once.
Shields are protective energy barriers that allow ships to survive the hostile environment that is space. Shields form an invisible band of energy around the vessel, a variable layer of force that can absorb radiation, interstellar dust, particle showers and weapons hits. Shields have a maximum tolerance and can be overloaded by sustained fire, forcing the generators to shut down to vent off excess energy.
Every spacefaring vessel is equipped with a certain amount of armour, capable of deflecting impacts on the ships' hull. The strength and thickness of the armour varies depending on the ship's size and type - a tiny escort ship will have a ribbed outer hull maybe a foot thick or less, while an 8-kilometre-long Imperial battleship will have three separate, heavily reinforced adamantium hull layers, with a total thickness of dozens of metres. Common among all the ships of the Imperial Navy ranging from frigate to Battleship size is the armoured prow, which is massively reinforced and can be hundreds of metres thick on the largest ships as it is also used as a ram prow. It is capable of deflecting all but the most powerful of frontal hits.
Most Navy ships employ warp drives to breach the barrier that separates realspace from the Immaterium and allow for interstellar travel. Implosion of these drives can lead to the creation of a warp rift.