There is confusion here.
@AWOL assumed the OP means that there is already a program loaded onto the Mega and the OP would like to investigate how it works.
@GoForSmoke assumed the OP has a new Mega and wants to learn how to write programs and put them on the Mega.
I have to say I make the same assumption as @AWOL but the OP will have to explain more clearly what he wants to know.
...R