A good place to start is the official datasheet (PDF) where you can get all the technical information you need. But I'll go over the basics here.

The LM386 is an operational amplifier than has been specifically designed for use in audio applications... which means its performance is based on the assumption that it will be driving speakers. At least at some point. However it can, like most other basic audio amplifier chips, be used as a regular op-amp as well.

It has a default gain of 20x - meaning it will multiply the voltage it receives on the input by 20 times, passing this through to the output. The gain value can be adjusted if needed.

The pins

1, 8 - Gain

Pins 1 and 8 are used to adjust the gain level from the default 20x using specific values of connected capacitors.

2 - Negative Input

3 - Positive Input

These are the standard op-amp inputs. Typically in a simple LM386 circuit, the negative input will be tied to ground while the positive input will receive the audio signal from the source.

4 - GND

5 - Vout

Pin 5 is the op-amp output, in our case the amplified signal which we send on to the speaker.

6 - Vs

The Voltage Supply pin receives the power required to operate the amplifier.

7 - Bypass

This pin provides direct access to the signal input, primarily used to remove power supply noise (preventing noise from being amplified).

Specifications

The LM386N ("N" signifying the preferred DIP package for our purposes) comes in 4 flavours: LM386N-1, -2, -3 and -4. The "3" and "4" versions have slightly higher output power, with the "4" version more so given its ability to handle more input voltage (at the cost of a higher minimum voltage requirement). For the rest of this article I'll refer to the LM386N-1, as it's the chip I had laying around and represents the most basic of the variants.

Supply Voltage (Vcc):

The chip requires a minimum of 4V to operate, with a maximum of 12V.

Speaker impedance:

The LM386 was primarily designed for a 4Ω speaker load, but is rated for 8Ω and 32Ω loads as well.

Distortion:

Under ideal conditions, 0.2% total harmonic distortion (THD) when driven with 6V of power into an 8Ω speaker at low power ratings, and up to ~10% THD closer to maximum power.

Output power:

Under ideal conditions you can expect about ~700mW of clean output power, or 0.7W.