Such transistors are much used as signal amplifiers, in oscillators and for switching. The bipolar part of the name was assigned to this class of transistor because it was seen as involving both the movement of electron charges and of electron holes. Junction was a reference to the junctions it has between n and p type materials and the word transistor was derived from its ability to change or transfer resistance. Bipolar junction transistors come in two types namely npn and pnp.

A diagram representative of an n p n transistor is shown right. The base material is essentially very thin but still keeping the collector and emitter separate. The transistor does not work as described below if the base is thick.
At the junctions depletion zones are created. As with diodes n material electrons move into p material holes to form the more energy stable depletion zones. The moves are particularly into the least doped p material, more so at its emitter junction because of its heavy doping and therefore bigger desire to give up electrons.
It is interesting to note that the more energy stable depletion zones have electron numbers greater than proton numbers whilst the n and p zones with equal electrons and protons are less stable. If we have been led to think that charge neutrality is a most desired state and ionised states desire change the above reveals the opposite can be true.
When we connect a supply voltage between collector and emitter with collector positive surplus electrons at the battery negative push into and apply pressure on the unwanted electrons in the emitter that seeking a location in which to better perform their role. They have no where to go because the base to emitter depletion zone wants to keep its energy stable state and presents a high resistance to such pressures. The electron shortage at the battery positive terminal pulls electrons from the collector but no circuit current flows because of the depletion zone resistance.

Now let us add a second voltage between base and emitter with base positive. This voltage is intent on pulling electrons out of the base and adds to emitter pressures. The thin depletion zone between these pressures releases electrons to the base because it can maintain its energy stability by getting electrons from the emitter and that is what it does.
The pressures in the highly doped emitter are large. For every electron leaving the base and heading for its supply there are about 100 emitter electrons trying to occupy its vacated location (hole). The inrush of electrons into the base put pressure on collector electrons that are also being subjected to the desires created by the supply terminal electron shortages. A continuous current flows.
Hopefully you can see why a junction transistor is regarded as a current amplifier. It is because the many electrons that reach the collector from the emitter are a multiple of the numbers of electrons going from emitter to base.

A diagram representative of an p n p transistor is shown right. It has a pnp sandwich instead of an npn sandwich; the doping levels and sizes of emitter, collector and base are much as before and depletion zones are created as for the npn. In the standard explanation the emitter is seen as emitting electron desiring holes.
A supply voltage between emitter and collector with emitter positive substantially adds to the pressures on the emitter to release electrons to the supply. The pressure brings limited change because the adjacent energy stable depletion zone highly resists change. At the negative terminal electron supply pressures satisfy the p material desires but I repeat no current flows.

Now if we add a voltage between base and emitter with base negative the thin base emitter depletion zone becomes subjected to pressures on both sides and it releases some electrons to the emitter which is already under serious pressure to release electrons to the supply.
The few base to emitter electron movements are sufficient to trigger a multiplicity of emitter electron releases to the supply line and the desires for electrons such releases create is met by the negative supply pressures pushing electrons into the collector.
In both npn and pnp transistors small electron movements flow between base and emitter enable and control much larger electron movements between emitter and collector. The action of an npn transistor is more to do with pressures between electrons whereas that of pnp transistors is more to do with structure energy desires for electrons. Both have their uses but npn’s are for this reason generally more responsive.