What is the difference between add to library and add to playlist?
Your library is all the media you own or have access to.  A playlist is just a group of media that you put together in a custom order; a subset of all that media.  The songs in a playlist don't necessarily have to be in your library (i.e. songs you access on Apple Music)

When you play songs on shuffle, the iPod will skip any songs that are in a playlist but not included in your library.

Apple explains it like this: 


  With Apple Music, when you add a song to a playlist from the Apple Music catalog, you can turn off the option for it to automatically add to your Library. For example, if you create a playlist for holiday music, you can add songs to that playlist without the chance that they'll play when you listen to your Library on shuffle in July.
  
  After you update to the latest software on all of your devices (iOS 9.3 or later, iTunes 12.3.3 or later, tvOS 9.2 or later, and Apple Music 0.9.7 or later on Android), when you try to add a song from the Apple Music catalog to your Library, you'll see a message that asks if you want to add the song to your Library or only to a playlist.
  
  You can change the setting to add songs to your Library at any time. When you change this setting on one device, the change applies to all other devices on which you're signed in with the same Apple ID.
  
  
  Go to Settings > Music.
  Turn off Add Playlist Songs.