To avoid charges, you must cancel your subscription or free trial in your iTunes settings at least 24 hours before the current period ends.
Payments for subscriptions are processed through your iTunes account at the time of purchase confirmation and at the start of each renewal period.
Note that any unused portion of a free trial is forfeited once a premium subscription is purchased.
After cancellation, the current subscription will remain active until its end, and then revert to the free version.
Free trial subscriptions automatically convert to paid subscriptions unless canceled.