It sounds like you are referring to the 3 month trial of Apple Music.
No, you will not have title or access to any Apple Music once your trial expires. It is an ongoing, paid subscription service. It is not like iTunes where you purchase individual music tracks.