How do transistors replace the electromechanical switch in an inverter circuit?
"The upper part of the figure shows a simple inverter configuration in which a bidirectional switch is used to alternate the voltage supply between the two halves of the primary of the transformer. The secondary side of the transformer outputs a voltage square waveform whose amplitude is given by the transformation ratio of the transformer and whose frequency is given by the switching time of the switch.

The lower part of the figure shows an inverter in which the transformer is used also to command the two BJT's. When the upper BJT is in saturation, the transformer primary is subjected to a DC voltage. This voltage is mirrored into the two auxiliary windings which drives the bases of the BJT's. While approaching magnetic saturation, the voltage in these two auxiliary windings falls down and so the upper BJT turns off. Since in the transformer core the H field is not zero, a current must feed the transformer. This causes a rapid voltage inversion across all the transformer windings, which turns on the lower BJT. This cycle repeats indefinitely and causes a square voltage waveform on the secondary output of the transformer." (Source: http://en.wikipedia.org/wiki/File:Inverter_ckt_01cjc.png)

This answers provides some links to relevant literature: What is the use of transformers with 3 pairs of wires?

The power output of a self-oscillating resonant converter like this depends of the saturation characteristics of the ferrite core. Therefore, such circuits are used in special applications like compact fluorescent lamps where precise trimming of the components is worth the effort because every tiny amount of cost counts. If you desire to have a known frequency imposed by an external oscillator, you may want to use something like an external timer IC (555 or the like). Also, resonant converters alone are no controlled devices (except if you like to call the core saturation a means of control). If precise control is required (like in LCD display backlights), the driving current for the resonant converter is often provided by a controlled stage similar to a step-down-converter. This answer provides some literature links on this topic: Electronic Drivers for Fluorescent Lamps: How is the DC-to-AC Conversion done?