Like declawing a cat, you cut off enough of the tip so the part of the beak has nowhere to grow back from. Only difference is in cats I think they cut up to the first toe joint.
Its a lose lose situation in many places where they raise these animals. If they are caged up and not debeaked, they peck each other to death due to boredom. In that respect, it is better for them. However, in the home flock, it is a disadvantage as they don't have the desire to pick each other to pieces because they have better things to do.
What we all have to do is promote the movement of small scale chicken raising so that we can supply our own eggs and maybe the eggs of a few neighbors. If we can do that, there won't be the need to buy them from the store, even though it will still exist for high density housing areas where it is not an option to keep birds. This way and fewer birds will be raised commercially and not need their beaks trimmed for their own safety in those conditions. Change starts from the bottom up on the consumer level. Attacking the big guy at the top = effective blood shed in the long run.
Education is key, what is the saying? Give a man a fish and he will eat tonight, teach a man HOW to fish, and he will eat forever? I don't quite remember the right way that goes but that's the idea.