This is an old revision of the document!
Programming Raspberry Pi with regular Python can be executed using development tools installed directly on the RPi, i.e. using Thonny[1]. It is not the case of programming with Micropython that one needs to connect to it remotely. However, installing an external development environment on a PC or Mac computer is usually more convenient. Visual Studio Code comes with a ready solution for both scenarios.
Python
In the case of the RPi programming, VS Code connects to the RPi via Secure Shell (SSH) and installs development tools remotely. The model is present in the figure 1.
Micropython
In the case of the Micropython, connection is usually made via serial port that is exposed either on GPIOs (RX,TX) or as a Serial over USB.