The national isolation in the Edo period refers to the closed situation where Japanese people were not allowed to go overseas and the trading with foreign countries was limited to the Dutch Commercial House in Nagasaki and Chinese ships. This is due to the government policy to stop Christianity from spreading in Japan. That belief was against the class system maintained by the Shogunate. 

History

This policy was deeply related with the banning of Christianity. (See here, Click.

The Tokugawa government tried to eliminate Christianity from the country, but it couldn’t fulfill this purpose only to increase complaints.  Finally, a big rebellion of 37,000 Christian believers occurred in Shimabara in 1637. The Shogunate suppressed the rebellion after four-month fierce battles, but it decided to take a more severe measure, that is, the policy to isolate Japan from the rest of the world. First, it expelled all the Portuguese from Japan because they were behind the spreading of Christianity. Moreover, Dutch people, who were allowed to trade, were confined to staying only in Dejima Island in Nagasaki.  More about Dejima, Click Here.

So said, it was not a thorough isolation from the world.  The Shogunate still had four trading gates: Nagasaki (with Holland and China). Tsushima (with Korea), Satsuma (with Ryukyu), and Matsumae (with Ainu).

After this, foreign countries requested Japan to open the country even with a military thread, but the Shogunate refused all and enforced the coast guard system.  The trading profits declined, but Japan had no international conflict with other countries and, domestically, maintained the peaceful society for 200 years. Moreover, Japan developed the culture in a unique way, without any foreign influences, which is very rare in the whole Japanese history.   

This isolation policy ended with the decline of the Tokugawa Shogunate and the rise of Imperialism in the West in the 19th century.