M4P (MPEG-4 Protected) is a digital audio file extension for the AAC (Advanced Audio Codec) container format. It uses lossy compression and is an audio-only file. In most cases, M4P files are purchased on Apple iTunes, which means they are DRM-protected. M4A is the unprotected version of M4P.
M4B is an audio filename extension for AAC format, which is developed by Apple Inc. It is mainly used on podcast and audiobook files. Typically, M4B files contain audio and other metadata like images, hyperlinks, and chapter markers. M4B files are DRM copy-protected and can be opened on Apple iTunes and QuickTime Player.