LM386 audio amplifier circuit does not work
The LM386's internal circuit is similar to an opamp, but optimized for high power audio. To get the best out if it you should follow the recommended circuit shown in the datasheet.

Your circuit actually does work, but not very well. The main problem is that you don't have a capacitor on the output, which is required to block DC voltage from getting to the speaker (without it the speaker could draw a high quiescent current, which will reduce its linear range and might burn it out). 

The input may also be a problem. The audio signal should be AC coupled to it via a capacitor, to stop DC voltage from upsetting the bias point of the amp. It's possible that your input source already includes a blocking capacitor, but unless you know exactly what circuit is being used you should not rely on it.  

The LM386 already has internal feedback resistors to set the gain, so using external resistors is redundant. The DC gain is set to 20 in order to keep output voltage offset and drift low. You can increase the audio gain by putting a lower resistance between pins 1 and 8, but it must be AC coupled via a capacitor to avoid increasing the DC gain.