The first thing you need (other than a crossbow) is a rope cocking aid. It's a simple tool, and a number of crossbow companies sell them, pretty much all of the same design. They all seem to be about the same price too (too much).
Price varies somewhat, but average price with shipping and/or tax is $20-$25, which feels a bit steep for four small pieces of plastic, two small pins, two small pulleys, and a length of rope. But that's the going rate at press time, and it's about what I paid.
Pictured above is Barnett's offering in the cocking rope arena. I chose to picture it for this article simply because it's the one I bought, and I like it. The rope is extra long, which makes it more universal. I tied a knot to shorten it up to fit my crossbow, and it's easy to untie it and adjust again, should I get a different crossbow in the future or the rope becomes frayed, etc.
If your rope is too long, don't cut it off - you might need that length later on. If so, you'll find that Dad's old adage is very true: "It's easy to cut some off, but it's hard to cut some on."