If you're an Apple Music subscriber, you can add songs, albums, playlists, and video content from the Apple Music catalog to your personal music library. And if you turn on iCloud Music Library on all your devices, you'll see any Apple Music content you add on one device across all of your devices, as long as they're signed in to your Apple ID.
To add an individual song from Apple Music to your library, launch the Music app on your iOS device or open iTunes on Mac or PC, navigate to the song, and then tap the plus (+) button next to it.
You can also find this button in the lower left corner when viewing the fullscreen playback controls for the song you're currently listening to.
To add an entire album, playlist, or music video from Apple Music to your library, launch the Music app on your iOS device or open iTunes on Mac or PC, navigate to the content in question, and then tap the +ADD button next to it.
Note that if your device doesn't have a Wi-Fi or cellular connection, you won't be able to listen to any of the Apple Music content in your library. To make it available for offline listening, you'll want to enable Automatic Downloads for Apple Music.