If you are just getting started, I would suggest familiarizing yourself with the example sketches you can find in the Arduino IDE menu File > Examples > Examples for <your board> ...
The examples are might be referred to as 'user' code, and a kind of prerequisite to the underlying 'source' code that our sketches run on.
When you're ready, all the open 'source' code can be viewed at
https://github.com/esp8266/Arduino/. And when you get to the point where you see something in there that could be improved/removed you can create your very own pull request.
Just to be clear, there is no "Arduino," but there probably is "AI-Thinker" and other AT firmware source code, as was used on some esp8266 chips. Your mission impossible, should you choose to accept it, is to extract your own copy from a board that came with the AT firmware. Then you will have learned much, including that it is compiled, and therefore not the source code. This message will not self destruct, so rest easy.