What's the difference between 代える and 代わる?

an app for which OS? thanks.

found a reference to it here - it is an Android app.