Previous screen

I have been working on my application since quite some time. A problem started last month and im not sure what’s triggering it. Every time i press the back key on android, the application exits instead of going to the previous screen like it used to. How do I solve this?