They make a pair of pliers that has a small protrusion between the jaws. That protrusion goes into the "head" of the cotter pin, then the jaws clamp shut. Then you just muscle the cotter pin out - the "legs" will straighten (sort of) on the way out. I don't know what they are called, I had a rigger give me a pair one day.
Edit: Just did a google search, and they make cotter pin removal tools, but none of them are the pliers I saw. Pictured were various tools that would use leverage because of their shape, rather than brute force needed with my pliers. Do a search, see what you come up with. If you own a sailboat, it is a tool worth having.