What are the procedure or process of entering a program into a computer's memory

Most open source or commercial programs have an installer. Run the installer and it puts all the necessary files in the correct places and updates the OS to be able to uninstall, etc.