If a country is isolated, it will have to produce everything that it needs: especially food clothes and medicine. It won't be able to specialize, but it will have to focus on satisfying the needs of the people.
If it is not isolated, it can specialize in the things that it can produce the best and fastest, and hope to exchange it for the things that it can't produce.