Too often, when someone or a company is planning on coming up with a new app, they will wonder what's the best features or best way to design it, but the most common problem should be solved before these.
That is, how is the function of it different?
The features, user interface (UI) comes second to the user experience (UX). The user experience being, what function(s) does the app offer. Does it offer better insights to something, does it bring better information to the user?
UX: What functions are being offered?
UI: What does the interface look like?
For example, someone may want to offer an app to count calories. However, you can change the UI on the app and it appears to be better or different, but in fact the UX is relatively the same.
If you don't solve the UX problem first, then the app is more likely to be doomed.
If you don't have a solid difference in the function of the app, then it's much harder to get a good user base and all UI investment will be lost.
However, UI is still important, because if the information that appears on the app is too complex but offers great function - detailed insights to problems, then UI needs to be solved.
For example, if you are in a complex environment, like medicine, you want to focus on UI more because a better UI will limit the number of problems a user is likely to make. Too much information may take too long to asses in a fast paced environment, so the user, medical professionals, want very good information (UX), but they want it in a simple format.
A simple way to explain the difference between UI and UX is a blog. The UI of a blog is pretty similar from site to site - nice pictures, content and a sidebar. However, the UX, the function of the blog, could be explained by the content provided.