Most of the ways programs achieve this is through an installer, which can do many things including modifying the registry to ensure their program is started upon startup, however you should always give your users the option to disable this behaviour.