The app can be downloaded for free, without payment. But it costs money to use the app or access all functions.
That's why you often see "Would you like to subscribe" when the app is opened for the first time. Some apps offer to bypass that screen and try the app for a short period of time. Either with advertisements or with very limited functions. When you download apps, notice if it says "Contains In App Purchase" it is always stated in the introduction of the app in the App Store.
If you are in doubt as to whether you have created a subscription, you can see and cancel active subscriptions here:
Settings > Apple ID > Subscriptions.