ActivityPub is a generalization of Email. Email gives you a cloud-hosted inbox that others can put stuff in. ActivityPub gives you both an online inbox AND a "outbox" that YOU can put stuff in that others can check out. Check out this diagram: https://activitypub.rocks/static/images/ActivityPub-tutorial...
The stuff here is called an "Activity" around "Objects". Follow request is a "Follow" activity with the "Actor" as the object. A tweet is a "Create" activity with the "Note" being the object. There's an entire vocabulary defined in the spec: https://www.w3.org/TR/activitystreams-vocabulary/#object-typ...
This way, all kinds of social platforms - from YouTube to GitHub - can be modeled in this general distributed pub/sub system.