Is there away to see the internal process of a software? I would like to be able to see/monitor how a software "works" once it's running. For example I would like to see what happens internally when you click on a button, or any other interaction within an app. I tried using Instruments (xcode), but Instruments only let me select an application that's already running. Which means I always miss the initial process of when the application starts running.

I am not looking for resource usage, just trying to understand how the internal files work.
Open Activity Monitor
Select the process you want to monitor
Click the "Gear" icon and choose "Sample Process"

NB: I am not claiming this will be of any use to you. It is generally only helpful for tracking bugs for someone who has the source code.