I've gone through this. This can be very serious, pecking leads to blood, blood leads to cannibalism.
Immediately pull the chicken out from the flock. If you can get some blue kote (caution, DO NOT USE "blue wound spray" because it will burn them and cause pain) to spray on the bloody feather stumps, you camoflauge the red - chickens peck at red. It has gentian violet in the spray, and it turns their feathers purple. Also has some antiseptic qualities.
Supposedly, pecking can be caused by too low protein in feed, too crowded conditions, too much light, too much stress, too much boredom.
So, try tackling all of those issues. If you are using a heat lamp, change to a red bulb. Add protein (sunflower chips, dry cat food, yogurt, cheese, scrambled eggs). Remove any stressors - too much kid activity? A dog running along their fence? Too rough handling? Think slow and quiet - anything fast (dogs, kids, you walking/moving fast, etc) can cause stress. Boredom - do they have stuff to pick at? Say apples, cabbages, corn on the cob, the corncob after you've had dinner, - if they don't have access to grass, put clumps of sod, weeds, etc in their runs. watermelon rinds. squash or big zukes. Throw scratch around for them to peck at. Kind of have to balance this - as these are very low protein foods at the same time you are trying to up the protein intake.
I finally had to resort to a duct tape shield covering the tail feathers - I got the idea from another byc member. Apply it from the back down to the tail, covering the pecked area. Might have to run two strips down. Make sure y ou apply it so it doesn't impede wing movement. It will eventually fall off - the first one I applied fell off in a few hours, the next one in a couple of days, and the last one stayed on for a couple of weeks.
It has been about 3 weeks since she has had a duct tape shield, she was fine, but two days ago she had another bloody stub. I used blue kote again, and it has been ok since then. The worst of the problem happened when the chicks were penned up in a smaller area before I could merge them with the older hens - now they have a very big area to roam in so the pecking has eased up, but obviously not erased.
Pecking at the tail feathers is a learned behavior and spreads quickly.
Try to watch and see if you can identify the worst perpetrator - you might need to remove that one.
good luck!