I changed my Apple ID but during update or download app it ask previous id password
This is because each App on your phone is linked to an Apple ID. You can change your AppleID on your phone, but the app will still remembering the AppleID from was installed initially. I found similar behavior if you use a phone backup from other phone different than your own. 

The only solution you have in this case is to unninstall each installed with the old AppleID and reinstall it again with your new AppleID. This will solve the problem. 

I hope it helps.