They’re not though. A trackpad processes relative inputs, while a touchscreen processes absolute inputs. If I touch the corner of my trackpad, it doesn’t produce a clock on the corresponding corner of the screen like a touchscreen would.
It’s much more similar to a mouse. In fact, if you just imagine your finger is a mouse, you’ve just described all of the functions of a touchpad except gestures, and gestures are just replacements for the buttons (two tap for right click, two finger slide for scroll wheel, etc).