For macOS, download and install XQuartz.
For X forwarding to work, you'll need to start Xming before connecting to the remote system with your SSH client (for example, PuTTY).
Most Linux distributions have the X server installed, but if your personal computer is running Windows or macOS, you will most likely need to install and run an X server application. The X server program manages the interaction between the remote application (the X client) and your computer's hardware. For X forwarding in SSH to work, your personal computer must be running an X server program.