iPhone: smaller touch screen, cellular data and cellphone, shows one app at at a time. No pencil. Most apps will work on both iPhone and iPad. Runs iOS.
iPad: larger touch screen, cellular data, no cellphone, many can show two apps at a time. Pencil. Most apps will work on both iPhone and iPad. Runs iPadOS.
Mac: permits larger and often multiple displays, uses keyboard and trackpads or mice for input, and does not directly provide for touch screens nor Pencil. Multiple users permitted. Allows multiple apps running together, some or all displaying together. Runs macOS.
Apple is transitioning Mac to an internal hardware architecture that is compatible with iPhone and iPad, so upcoming Macs will be able to run iPad and iPhone apps. Don’t expect that iPad or iPhone will run Mac apps, though. Prior to that upcoming architectural transition, Macs cannot run iPad or iPhone apps.
And yes, for those more familiar with the Apple products, I’m definitely glossing over some details here, including but not limited to Sidecar and Pencil, iPod touch, Apple TV, and Watch, and third-party options.