See this, View, change, or cancel your subscriptions - Apple Support
However, if it is not billed through iTunes, see this, Get help with subscriptions not billed through Apple - Apple Support
It is going to depend on what may be indicated from the app developer as well on how to handle cancellation before the trial period is over.