If your app acts like a home screen and you have no other home screen installed (or checked your app as default) it will start on boot and you won't be able to exit it. Unless you kill the task somehow, but that's not preventable.
Your app has to use the
android.intent.category.HOME
intent to be the first visible app on boot.
If you want some source you can look at Anderweb's ADW Launcher https://github.com/AnderWeb/android_packages_apps_Launcher