By default, certain tasks will be run on the control node (that's your Ansible server) or on your managed nodes (the target systems). For example:
There are different ways to modify this behavior. The following can be used to invoke a module on the control node (that's your Ansible server).
Or, it you can set -hosts: localhost in your playbook to run the playbook against the control node.
---
- hosts: localhost
tasks:
- debug:
msg: Hello World
...