What do I need to know. Also, do you need to go to special classes or can you train by yourself?
That's a lot of question.
. As far as what you need to know, read through the Rally section of the forum. I've written overviews of the similarities and differences of the two main venues at least a couple of times, and once was within the last few days. After that, go to the AKC (or in your case, probably CKC, right?) and APDT websites to read the rules and regs in full.
You don't need "Rally classes"... But you do need a good solid start in obedience training, and for most people, that means some lessons. Your dog must heel well with good attention, and needs reliable sits, downs, stands (and the ability to change from one of these positions to another), fronts and finishes (right and left) and the ability to do various types of turns in both directions to compete at the novice level.
At the novice level, all exercises are done on leash, but the the dog must work on a completely loose leash (ideally, with a "j" loop in the leash) to receive full marks. Every instance of a tight leash will cost you one point, and a consistently tight leash is grounds for NQ.
So if you are experienced enough to train all of this independently, and you are good enough in your OWN footwork and handling skills, you could train for Rally by yourself. Most people need at least SOME lessons to get to this level. As a first time dog owner/trainer, I took regular lessons (usually twice a week) for over a year before Kodi and I were ready for our first competition. But it paid off, in that I felt confident that we could do the work going into the ring, and Kodi didn't disappoint me!