You can easily cancel your Apple Music subscription from the Music app on your iPad or iPhone. Here's how:
1. Open the Music app on your iPad or iPhone.
2. Tap the Profile icon in the upper left hand corner.
3. Tap View Apple ID.
4. Enter your Apple ID password.
5. Scroll down to "Subscriptions" then tap Manage.
6. Tap the Automatic Renewal slider so it is OFF.
This allows you to finish your free trial or current billing month without being automatically charged for the following month. Users with a paid subscription will go back to having limited access to Apple Music after the current month is over. You can see a list of free Apple Music features here.