If you’re interested in digging deeper into a specific core, source files for AVR boards, which are installed by default and fairly well commented, can be found at:
// Windows
\Arduino\hardware\arduino\avr\cores\arduino
// macOS
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino
Whereas cores you’ve added via the Boards Manager are defined in:
// Windows
\users\<username>\AppData\Local\Arduino15\packages
// macOS
/home/<username>/.arduino15/packages
These file types are easily opened and edited by Visual Studio Code, Sublime Text or any other code text editor.