Messages is one of the original iPhone (now iOS) apps shipped with the iPhone. It is included in macOS since OS X Mountain Lion.
The messages app is fairly complicated since it now exists on two platforms with different functionality on each.
- iOS Messages is one of the original apps and went from SMS only, to SMS and MMS and now SMS, MMS and iMessage on iOS 5.
- Messages for macOS/OS X was available as a beta on OS X Lion and is included in macOS since OS X Mountain Lion. Messages unifies iChat and iMessages on the macOS platform.