Sometimes, cockatiels yank out the occasional feather—usually it's part of the grooming process. If that feather has blood on it, though, it's likely a special kind of feather, and he may have pulled it out because he hurt himself. If you aren't careful, he could bleed out.
Normal Preening Behavior
There are plenty of reasons your cockatiel may pull out his feathers, and it isn't always a cause for concern—it's a relatively harmless form of preening that's only bad if he does it obsessively. However, that doesn't mean you don't have to keep an eye on the feathers he's pulling out. If he pulls one out with blood in or on it, you need to give your bird a look, because he may still be bleeding—cockatiels, like other birds, are not particularly effective at clotting.
Blood Feather Breaks
A bloody feather is most likely a blood feather—this is a feather with an artery and a vein in it, pumping blood up into the quill. That feather has nerves in it too, so if it breaks, it's a painful experience for your bird. Instinct, as well as the pain, should motivate him to yank if out so that a new one can grow in its place. If he doesn't, you or the vet will have to help him—think of it like pulling a broken tooth. It's not doing him any good broken, and it won't get better unless it comes out.
Helping Your Cockatiel
Birds tend to be bleeders, and depending on how yours did when he yanked his blood feather, he could still be bleeding where the quill emerged from his skin. If that's the case, you can step in and help stop the bleeding, potentially preventing him from bleeding out. Applying a commercial styptic powder from your pet supply store will help your bird form a clot—if it doesn't, apply pressure until you can get him to an avian vet.
More Underlying Causes
While feather-picking can be a normal grooming behavior or a reaction to a broken blood feather, it can also be a cause for alarm. For example, a skin infection or parasitic infestation can drive your cockatiel to pull out his feathers, as can a thyroid disorder, malnutrition and other causes. Your bird may pick his feathers with such fervor that he'll start to bleed—if he obsessively pulls out his own feathers, he should see a vet, to rule out any underlying health conditions.