1. M4A vs M4B - Application & Usage
M4A is used for DRM-free digital music distribution, while M4B is used to store audiobooks and audio podcasts. Both support metadata including chapter markers, images, hyperlinks, etc., but M4B allows "bookmarks" (resume playback where you left off at another time), while M4A does not.
2. M4A vs M4B - FairPlay DRM Copy Protection
M4A is DRM-free. The music file that protected by Apple's FairPlay DRM is in M4P format. Whereas, M4B has DRM-ed and DRM-free versions in audiobook and podcast files. Audio files purchased from the iTunes Store are encrypted and ones downloaded from the web are DRM-free.
3. M4A vs M4B - Encoding Method
In addition to lossy AAC audio, M4A can also contain audio data in Apple Lossless (ALAC) format, while M4B file is encoded with the AAC compression format only.
4. M4A vs M4B - Compatibility
M4A is compatible with most hardware and mobile devices, while M4B purchased from iTunes can only be placed into iTunes and devices authorized via iTunes.