When you pay monthly or yearly for an app, that payment is not held by the app itself. It belongs to the store account your phone signs in to, which is why a subscription can only be stopped from the Google Play or App Store subscription screen. Deleting the app leaves the billing untouched.
The steps below cover Android and iPhone separately. You will also see how to cancel before a free trial turns into a charge, how long your access lasts after cancelling, and how to open a refund request for a charge you did not mean to make.