There are a lot of different Tesla Coils out there, but for the scope of this I'm going to talk about 2 - Spark Gap and Solid State.

As far as the design goes, Tesla Coils are fairly simple. If we look at the SGTC (the first image), it consists of a high voltage step up transformer, a spark gap, a capacitor and two coils. As I mentioned earlier, we want to generate an electromagnetic field to induce a voltage in the secondary winding's. This voltage is going to be stored on the top load (usually some metallic object, to act as a capacitor) and eventually we'll pass so much electrical energy to the top load it'll ionize the air around it (basically tearing the electrons from the atoms of oxygen/nitrogen etc. causing a flow of charge) and produce a spark!

The more current we pass through the primary coil (and the quicker it flows), the greater the magnetic field we produce and hence the larger voltage we induce in the secondary. This is the reason for the gap in the electrical circuit. We charge up the high voltage capacitor (using the high voltage transformer, this steps up mains voltage to around 30kV). As the capacitor is charging up the potential difference (or voltage) at the top of the spark gap gets higher and higher. Much like the voltage on the top load, when it's sufficiently high enough it will ionize the air between it, then short the circuit! The gap basically acts as a switch, and when it's 'closed' the capacitor rapidly discharges causing a HUGE current to flow through the primary.

As aforementioned the spark gap acts as a 'switch', you can adjust how often it 'turns' on by changing the distance between the two points. If they're closer together then the time to charge the capacitor to the breakdown voltage is less, hence the we energize the primary coil more often (I believe a general rule of thumb is that 30KV is needed to bridge a gap of 1cm). Conversely, if we make the distance greater it takes longer to charge the capacitor, ergo, we energize the primary less often, but when it does break down the spark gap we get a larger flow of current. But we now live in a age of semiconductors, so it seems fitting to replace the spark gap with solid state switching devices - and this leads us onto SSTC (Solid State Tesla Coils). The circuit it very much the same (the circuit design is shown in later steps and thoroughly explained) but we need to add in some switches. These can be MOSFETs or IGBTs - it's usually the latter due to their high current handling properties. A high level abstract of myMusicalTesla is shown in the image above. We have three main components - the rectifier (to change the AC mains to DC) the switching circuitry (to energize the primary coil) and the interrupter (this is used to create music, more on this later). Introducing these switches also means that we no longer need such high voltages - because we don't need to bridge an air gap. This reduces the size and maybe more importantly, the cost.

So far it seems fairly simple, but the complexity comes in when we see that this is an LRC (inductor - resistor - capacitor) circuit, loosely coupled with another LRC circuit. Because it's loosely coupled not all the energy is passed per cycle. What's more is we want to be able to pass as much energy per cycle as possible - and this can be done by energizing the primary coil at the resonant frequency of the secondary. Before I explain how we calculate the resonant frequency (see the step regarding the secondary coil), I'll explain what resonance actually is.

I would highly recommend visiting Richie Burnett site - he explains in a lot more detail how Tesla Coils work and he really gets down and dirty with the math - he also includes a lot of 'scope traces to further back up the theory, a must read for Tesla Coil enthusiasts!