1. Figuring out what to do. 2. Actually doing it, consistently, over the long haul.
Crossfit will teach you how to do the old-school, badass basics of fitness--stuff that will get you in great shape and is actually fun to do. No gimmicks, no miracles, just stuff that will kick your ass.
Doing Crossfit also makes you a member of an incredibly friendly, supportive community. This makes it so much easier to stick with it--every class, you'll see people in your community, friends, going hard and making progress. You support them and they support you. You'll work out with beginners, who you can help, and with badasses, who can help you.
A well-run Crossfit gym is a magical place.