If you're library is confused, i would advise you to start over and start with the Apple music songs and then add the ones they don't have there. It's a lot easier than to have to organize them. I did that way and my library went from a mess to lovely organised.
And, except a couple of albums, Apple Music had everything.
As for your question, lets say you add a album from Apple Music to your mac. That album becomes available on your music app on your iDevice, but it's not downloaded... It's ready to stream but, for download you have to tap the album (or the song you wish) and choose to save for offline.
Same goes with playlists. If you create a playlist in any of your devices, it's available on your other devices, but you have to manually download it.