If you mean viewing the source code to an exe file, you can't. The most you can get is assembly (by using a disassembler) and that isn't nearly as readable or useful as the original source.
I'd recommend looking at open source software. Some popular examples are Firefox, Audacity, VLC, Linux, etc. To get this code, just google for "<program name> source code" and you should get the page the code is hosted on (likely GitHub or SourceForge).