Read the datasheet of the LM386: "The inputs are ground referenced while the output automatically biases to one-half the supply voltage."
The chip adds an offset voltage internally.

The way this is done in the chip is rather clever: On the left, the inverting input's PNP emitter follower is biased with two 15k resistors in series from the supply voltage (30k in total, with a bypass terminal in the middle to improve PSRR). The non-inverting input's PNP emitter follower, however, is biased with a 15k resistor from the output. The PNP followers form a differential amplifier and an NPN current mirror below them forces equal currents through both PNP followers. This means that the currents through the 30k and 15k resistors are equal, which in turn makes the voltage across the 15k resistor half of that across the 30k one. Therefore, the output is roughly at half of the supply voltage when the amplifier is quiescent.
The gain resistors between the PNP followers (150 Ohms, 1.35k Ohms) have zero current flowing through them when the amplifier is quiescent. When an AC input signal is applied, though, they skew the current balance between the two PNP followers. This causes the output to swing around the half-supply-voltage midpoint, which in turn varies the current through the rightmost 15k resistor to compensate the current imbalance, thereby achieving linear amplification. (The current through the gain resistors is proportional to the input voltage, and the current variation in the 15k resistor is exactly equal to the gain resistor current. Therefore, the output voltage varies linearly with varying input voltage.)
At no point are any negative voltages involved within the chip's internal circuitry.
This still works for negative input voltages since transistors can still operate when their collector-emitter voltage is lower than their base-emitter voltage, up to a point (the transistor's collector-emitter saturation voltage). With -0.1V at the input of the amplifier, for example, the PNP emitter follower has to output about 0.4V at its emitter (assuming 500mV base-emitter voltage drop). Its collector is at 0V, leaving 0.4V collector-emitter voltage for the transistor to operate. This is sufficient and the emitter follower can follow the input voltage just fine. Typical saturation voltages (minimum collector-emitter voltage for the transistor to operate without saturating) are between 10mV and 100mV. In this case, this means that the PNP follower's emitter can go down to at least 100mV before it stops working (and the input therefore down to -400mV), which matches the datasheet value. The rest of the circuitry won't actually see any negative voltages.
The same principle is used in rail-to-rail opamps in order to make them accept input voltages slightly beyond the positive and negative supply rails. (Just usually with FETs instead of BJTs.)
The chip's overall function is essentially this: Vout = 1/2 * Vcc + (V+ - V-) * gain