Planetary Defense Force
In Warhammer 40,000, a Planetary Defense Force is, as the name suggest, an armed force that protects a single planet (as opposed to the Imperial Guard, which travels from planet to planet). They have a tendency to try to respond, but to be killed to a man.
The Imperium of Man is a very feudal empire; while much is made of the Space Marines and Imperial Guard, they cannot be everywhere at once, and so each world is expected to be able to protect itself. On civilized worlds, the PDF fill that role, either fending off attack entirely, or holding out long enough for off-world assistance to arrive.
We never hear about their victories, partly because stories where the PDF wins are not as interesting as those where the Imperial Guard and Space Marines have to get called in, and partly because most planets make their Imperial Tithes by bundling the best few percent of their Planetary Defense Forces into IG Regiments and shipping them off-world. This results in the PDF losing its most competent members, which means that when planetary threats do arrive, they can fold like wet paper. As such, the Imperial Guard consider them grossly undertrained, incompetent, and poorly armed compared to the Guard. The irony of this is lost on the Guard itself. Better yet, it highlights just how bad it is to be a member of the PDF.
To be fair, not all PDF are incompetent pushovers. For example, Cadia's entire population is militarized from birth, in reserve if not in active duty, and those active duty Cadians who are selected to stay instead of being shipped out to the Guard are chosen at random instead of by lack of merit. This means that Cadia's PDF is every bit as skilled and tough as any of the planet's many exported Imperial Guard regiments, and train just as hard, just as frequently, and are just as well supplied for being on a fortress world. However, examples like this are the exception rather than the rule when it comes to PDF quality.
Often, when PDF aren't incompetent, they turn traitor. While an Imperial Guard unit is constantly shuffled from world to world, only resting in transit, and under the watchful eye of a Commissar, the PDF may go for years or even lifetimes without seeing a planet-scale defensive effort. As such, they often also serve as local law enforcement. This can result in the PDF being more loyal to the planetary government than to the Imperium; if the planetary government turns corrupt, they can bring the PDF with them, which makes it that much harder for the Imperium to reclaim the planet later.
The three notable exceptions to this rule are the Armageddon PDF, who often fight the orks still on the planet, as a result to a lower than normal Tithes for a planet of its size allowing the Armageddon PDF to be well trained and funded. The other is the Ultramar Auxilia, as Ultramar has no tithe due to supporting the Ultramarines Space Marine Chapter, also since they must meet the standards of Space Marines resulting in higher than normal training, generally they are still shipped offworld like normal guard and often support the Ultramarines. And the last is the Cadian Interior Guard whose members are chosen from the BEST in the Cadian Shock Troops Imperial Guard regiments
The greatest irony is that if the Imperium would only enforce the training of planetary defence forces to a decent standard (as they are so eager to get their mitts on your tithes!) then the heretic and xenos would have a damn harder time taking over worlds and the guard and marines won't have to keep running in to save them and could actually concentrate on the full scale invasions (But of course that much common sense won't be at all grimdark enough....). Not to mention the fact that if the Imperium were to require worlds to also have their own law enforcement that is controlled by, trained by, and generally indoctrinated by, the Adeptus Arbites, you wouldn't have to worry much about A) crime (pickpockets would be shot, soooo...yeah) or B) turncoat PDF (because of fanatical loyalty to Imperial law). So then you would technically have two competent fighting forces on the planet, both of which separate enough from local affairs to remain loyal to the Imperium. The PDF and the local law enforcement. Then the Guard to concentrate hundreds, perhaps thousands of regiments on threats instead of a few dozen. Not to mention how much hurt the Astartes would be free to lay down. However, it's questionable whether such doctrination would work. One of the reasons the the arbites are so loyal to the Imperium instead of the planet they're stationed on is because they come from a different planet.
Also, there was one (yes, one) PDF trooper worth noting. Some guy with a forgettable name fought alongside Uriel Ventris of the Ultrasmurfs during a fight against Tyrannids. When he ran out of shots for his lasgun, what did he do? He picked up a discarded chainsword and charged the 'nids with it! He actually managed to keep up with Ventris, an Ultramarines Captain. When a Carnifex came to blow them to bits with bio-plasma he ran back, grabbed a missile launcher, and shot it in the face! Then picked the chainsword back up and charged again. After the battle was over, Ventris visited him in the hospital and, in front of everyone announced that this man had saved his life and about how badass the guy was to keep pace with an Astartes. If you've played or seen the Space Marine game, you must realize how incredible a feat that is. Ventris then removed one of his purity seals and gave it to the man. Clearly, the mustering of the Guard missed one.
And the ones Ciaphas Cain hang out with in Death Or Glory.