Having just done it; when you train for this, you want to be doing sprints, sprints, and more sprints. Then some sprints for variety and finish off with some sprints.
The way it works is you run 20m to a cone and 20m back in an annoyingly short amount of time. Then you get 10 seconds to slow down and recover, and then you go again. (This all assumes you're doing the "intermittent recovery level 1" test, which appears to be the standard for referees, but there are other things also branded "yo-yo" that work differently.)
Most people talk about the test in terms of something called "speed level" or just "level", which doesn't appear to increase according to any kind of outwardly logical sense and which refers to how fast you're running (I'm sure it does all make sense if you can find out how the test was designed). You do one shuttle at speed level 5 (which is a slow, easy jog), one at level 8, two at level 11, three at levels 12 and 13, and then eight at speed level 14 and higher, which is where the test really begins. Levels 5 through 13 are mostly a warmup to get you familiar with the test and raise your heart-rate and let you figure out how it all works before you come under pressure.
Your result is usually expressed in the form "speedlevel.shuttlenumber", so a result of 15.3 means you successfully completed the third shuttle at speed level 15 (which isthe 22nd overall shuttle). If you fail to complete a shuttle in the time, you get a warning, and then your next failure ends the test; it's possible to get warned at 15.2, complete 15.3, 15.4 and 15.5 and then fail on 15.6, and your result would be 15.5.