Structure and Interpretation of Computer Programs, by Abelson, Sussman, and Sussman.
Also known as "The Wizard Book" or "SICP".
The full text is legally available online[1], but I found it worthwhile to buy a copy.
There are at least two really good sets of video lectures to go with it if you are so inclined. Personally I enjoyed the ones from Berkeley.
[1]: https://mitpress.mit.edu/sites/default/files/sicp/index.html