Raw *.aac files are just that, they are raw AAC audio without any container. See, there are many containers out there and these containers can hold certain types of audio and video data. AAC audio is normally wrapped in a mpeg-4 container to make life easier. mpeg-4 AAC audio commonly had three types of filenames: *.m4a (used commonly by iTunes, Apple pretty much set this standard up), *.mp4 (commonly used by other, less known applications), and *.m4p (used only by Apple to show that your content was purchased from the iTunes Store). You can freely go from a *.mp4 to *.m4a by renaming your files, there is no need to convert since they are essentially the same thing.
You cannot simply convert a *.m4p file though as it contains DRM and prevents you from doing so. You will have to burn that to a audio CD and rip it as a different format. *.aac files can be made into *.m4a/*.mp4 files by taking the AAC audio and manually putting it in a mpeg-4 container. This can be done with many different applications. All of those formats are essentially the same thing though but their filenames distinguish them for different uses.
1. AAC stands for either MPEG2 Advanced Audio Coding or MPEG4 Advanced Audio Coding.
The MPEG2 audio-encoding standard of the format is not backward-compatible with MPEG1 audio. MPEG2 AAC can produce better audio quality than MP3 using less physical space for the files. MPEG4 AAC can produce better quality and smaller files than MPEG2 AAC. AAC is the audio file format used by Apple in their popular iTunes Music Store
2. The audio file format used by Apple in their popular iTunes Music Store often appears on your system with the ".M4A" filename extension. M4A can produce better audio quality than MP3 using less physical space for the files
3. M4P format is "protected AAC". It is a format of purchased music that can be listened to only through the iTunes softer or an iPod.
Careful kevin, not all mp3 encoders are alike and saying that "m4a can produce better audio quality than mp3" is true but the differences between the iTunes/Nero AAC encoders and Lame mp3 encoders are minimal that the average listener would not hear them. Wow, that was a long statement.
Both M4P and M4A are used for Apple iTunes audio files that are encoded by Advanced Audio Coding (AAC). However, the DRM-free songs you download from iTunes are in M4A format, while the songs with Apple FairPlay DRM are in the M4P format including new Apple Music. For music bought from iTunes store between 2003 and 2009, there is DRM encryption on the songs. Afterward, Apple set the iTunes music free since 2009. But now all Apple Music songs are encoded in M4P format.
You can't directly convert M4P to M4A directly unless you have a converter.