J.P. Morgan interview question

when a program executes , what activities the OS will do and how a program executes?