What Really Happens When You Call a Smart Contract?

You’ve probably written something like this before.