An open system is open to exchange of matter and energy with its surroundings or environment, while a closed system can only exchange energy with its surroundings. An example of a closed system is heating something (say air in a balloon or a metal), only energy is supplied which will say, heat air or melt metal, but no matter will be added.
An open system can be made a closed system by prohibiting any exchange of matter with the surroundings. For example, if we are cooking dinner and adding both the heat and matter (Such as vegetables, spices, oil, etc.) to the pan, it is an open system. Once we stop adding anything and cover the pan with the lid, it converts to a closed system. Therefore, stopping the exchange of matter (by providing an isolation from the surroundings) is how one can convert an open system to a closed system.
Hope this helps.