Hi lalel345,
Do you mean connect to another Godot instance which is running as a server?
If yes, and if you are planning to use the Godot High-level multiplayer API, the docs here cover how to setup the server and client ends
Also, you can see a nice series of tutorials here plus the source for an example project in github here
I hope that helps