This is a huge question, and a huge topic, much too big to answer completely here. How about you start with the absolute basics:

simulate this circuit – Schematic created using CircuitLab
Switch SW1 opens and closes very rapidly, under control of an oscillator, V1. When SW1 is closed, node X is connected to 0V, ground, and with the full 3V supply potential difference across inductor L1, current "slowly" rises, flowing via the red path, through the switch.
Current through an inductor does not change instantly (which is why inductors are useful), and at the instant the switch opens, whatever current was flowing in L1 just prior, continues to flow. The current path through SW1 is cut off now, and with nowhere else to go, it must flow via capacitor C1 instead, via the blue path, charging C1 up a little.
You are no doubt aware that when you disconnect an inductor that is passing current, the voltage across it rises to whatever value is necessary to continue to pass that current. In air, this is what causes the spark you see, a voltage spike large enough to ionise the air, causing the air to conduct suddenly, resulting in that spark, and dissipating the inductor's stored energy. What happens here is that node X rises in potential just enough to forward bias D1 into conduction, so that this current can continue to flow, and eventually diminish to zero again. That means that potential \$V_X\$ is a series of ever increasing pulses, slightly greater than C1's voltage at the time. Keep this in mind when I talk about the oscillator below.
Diode D1 is necessary to prevent the capacitor from discharging again each time the switch closes. Current can only flow to the right through D1.
The result is that at each cycle, C1 gets "topped up" with extra charge, and the voltage across it will rise over time, in steps. That's \$V_{OUT1}\$ shown in blue here:

The top circuit uses ideal components, but the one below it uses real ones. They will necessarily reduce efficiency, with power being lost as heat in any resistive element, and consequently we find that the capacitor doesn't charge up quite so fast, or as far. In that circuit I have replaced the "ideal switch" with a very imperfect transistor. Its role is the same, but it suffers from switch-on and switch off delays, non-zero resistance, and a litany of other imperfections, but it gets the job done. Output OUT2 is shown in orange above.
My Q2 here is the equivalent of transistor Q2 in your own circuit, hopefully you can see the equivalence. Your own Q1 is necessary to make the system oscillate, as source V1 does in mine. It senses potential \$V_X\$ at node X, and uses that to enable or disable Q2, in "antiphase", 180° out of phase with Q2's existing condition - when Q2 is on, Q1 switches it off, and when Q2 is off, Q1 switches it back on again.
In your circuit, there's no current sensing, no frequency control, and no pulse width control. That circuit relies entirely on a very careful balance of base and collector currents (controlled by R1 and R2) for Q1 and Q2. Therefore, you can't just chop and change Q1 and Q2 between different transistor models, since each one will have different current gain. For low gain transistors (like the 2N3904 and 2N3906), you'd need to lower R1 and R2, and for higher gain devices (like the BC547 variants, or BC327) you would need to increase R1 and R2. With such loose control, switching of Q2 isn't very sharp or complete, and a lot of energy is lost in Q2 - it will get quite hot, and this design is very inefficient, even if you get every component value here exactly right.
This is a delicate balance, hard to achieve. It is very easy to have too much collector current in Q2, and damage it, or not enough, and have no oscillation. This circuit is not a good design, except for its instructional value. In any practical design the oscillator, and its mark-to-space ratio must be much more precisely defined and controlled, and will be different for each possible L1 or C1. As I said, this is such a big topic, that I can't really put more than this small dent in it here.