Since there is a lot written and explained about this subject, I will make it more practical - in the form of a series of experiments implemented through CircuitLab.
"Floating" base
Basically, if we leave the base of a transistor unconnected, its base-emitter voltage Vbe and base current Ib should be zero; so it should be cut off.

simulate this circuit – Schematic created using CircuitLab
Leaks occur
The problem, however, is that there are always some leaks (paths with resistance or capacitance) between the base and supply rails. Let's simulate such a leakage by connecting a high resistance (1 MΩ), Rleak resistor between the base and the positive terminal of the supply voltage Vcc.

simulate this circuit
As a result, a base current flows through the base-emitter junction and the transistor is saturated.
Increasing the leakage resistance
A straightforward way to solve the problem is to increase the leakage resistance (for example, by cleaning the board). For the circuit shown, if it reaches 100 GΩ, the transistor will be cut off again.

simulate this circuit
Grounding the base
If the leakage is significant (e.g., 1 kΩ), the best solution is to ground the base (short the base-emitter junction)... of course if this is possible in the particular application.

simulate this circuit
This is the preferred way of controlling the transistor switch when the turn-off time is important. The reason is that there is an accumulated charge in the base of the saturated transistor that must be dissipated through some path.
Shunting resistor
We usually do not have to be so brutal and can solve the problem by connecting a resistor Rshunt of moderate resistance (e.g., 10 kΩ) between base and ground.

simulate this circuit
The two resistors Rleak and Rb form a voltage divider. Its voltage is less than 0.7 V so the transistor is cut off.

simulate this circuit
Significant leakage
But if the leakage resistance is relatively low (e.g., 100 kΩ)...

simulate this circuit
... the divider's output voltage is more than 0.7 V, and the transistor is saturated.

simulate this circuit
Negative base voltage
Then the remedy is to "pull down" the base below ground by another but negative voltage source Vee.

simulate this circuit
Now the two resistors Rleak and Rb form a bipolar voltage divider whose output voltage is negative so the transistor is reliably cut off.

simulate this circuit
Positive emitter voltage
Instead to "pull down" the base below ground, with the same success we can "pull up" the emitter above ground by another positive voltage source Ve. The result is the same - the base-emitter voltage Vbe is negative.

simulate this circuit
An advantage of this method is that there is no need for a second source because the positive voltage can be obtained from the power supply, for example with an Rd-D network.

simulate this circuit
A disadvantage is that when the transistor is saturated, its collector voltage will be raised by 0.7 V.