How can I edit files in a Docker container from an editor on my host?

I’m new here, so appreciate your patience with my question.

I have a container which has 5 folders with files that I want to modify via Visual Studio Code outside the container, not with Nano or any other editor in the container itself.

I’ve seen many recommendations to mount a volume. How can I go about trying that?

Source: StackOverflow