The default behaviour of the hardware back button in Windows Phone is to close the current application and go back to the previous App or screen that was launched prior to lauching this App .
In Windows Phone 7 (Silverlight or XAML App ) , you can detect the hardware back button press by handling the PhoneApplicationPage_BackKeyPress event .
Read More about Windows Phone and PhoneGap – Article #14 – Detect Hardware back button press @WindowsPhoneRocks.com