In a nutshell
An LSTM is a recurrent network with a built-in memory line called the cell state, plus three gates — small 0-to-1 valves — that control it: a forget gate erases, an input gate writes, and an output gate decides what to reveal. Because the cell state is edited by adding rather than rewritten each step, information can survive many tokens, letting the network learn long-range dependencies that a plain RNN forgets.