mp4 - Codec or Container
MP4 has not really an official meaning, but it adds a lot to the MPEG-confusion. MP4 refers to MPEG-4 which is a huge collection of video-related standards that has been growing for more than 20 years.
MPEG-4 part 14 container: takes an .mp4 file extension, therefore often just called MP4, if it contains audio, it can also have the .m4a extension, for video .m4v, and others (.m4p, .m4b, .m4r). the container format is a derivative of Apple QuickTime's container format (.mov).
MPEG-4 Part 2 video codec: Most often just called MPEG-4, sometimes it also takes the name of the encoder software: Xvid, DivX... Became the first de facto standard for web video.
MPEG-4 Part 10 video codec: also called MPEG-4 AVC and (ITU-T) H.264, and by the name of it's most popular encoder software: x264. De facto standard video codec today: video conferencing, smartphone videography, Web, Blu-Ray, TV, camcorders. Almost all video capable devices ship today with H.264/AVC hardware codecs by default besides newer but still less common codecs like VP9, HEVC or AV1. The successor for H.264/AVC has been coming since 2013, but just for fun they decided not to call it MPEG-4, but MPEG-H Part 2 also known as ITU-T H.265 or High Efficiency Video Coding (HEVC).
AAC (Advanced Audio Coding) is often called MPEG-4 Audio. It is probably the most prominent amongst the many codecs standardised in MPEG-4 Part 3. It often uses the file extension .mp4 or .m4a
I'm not even going to start about all the other MPEGs :-)
TL;DR
MP4 could mean a video codec, a file that contains video and/or audio or even something else. It's not a clear term.