Why do I have to enter password when I open an app on my iPhone?

I downloaded an app from another persons iTunes account and whenever I open the app it asks for the password or it closes the app. It doesn't do this for my friend apparently so do you have any advice?

Sometimes, your iPhone just wants to make sure who's using the app is actually the owner. Don't worry, it doesn't know that it's not your iTunes account. You just have to type it in. After doing this a few times, it'll eventually stop. It's no big deal. Your iPhone just does this to protect your data.