I know this thread is old... but, I wanted to make sure I clarified something misleading in paulsm4's answer...
X is backwards... You do not connect to an X server. You run the server on your local machine (what he is calling the client is actually the server). When you connect to a remote Nix box that has the X libs installed, and you add the -X switch to your SSH command, ssh will forward X requests back to you. The program running on the other side (Gnome, Chrome, PyCharm, etc) will be your X Client, and it will be upstreamed back to your desktop that contains the X Server. Here it is as a sequence Diagram:
User Remote
-----------------------------------------------------------------------
User Inits SSH -X Session -----------------> SSH Server Auth User
|
V
SSH Session is established <---------------- SSH User is Authenticated
|
V
User Initiates App on server --------------> App Starts Running
|
V
App Writes output to X Server
|
V
Xorg receives write commands <-------------- SSH Tunnels that back to User
|
V
Writing occurs on desktop
-----------------------------------------------------------------------
Most of the time, the X Server and X Client are the same (as happens on your local Desktop). Therefore, once the client writes to X, the local X server writes to the screen. The display process is actually done on the user's computer, where-ever it is, your computer becomes the server. Crazy ain't it?