Ex. A cup of hot coffee is a simple example of an open system, in this example interchange of energy in the form of heat and matter in the form of coffee both can take place across its boundary.
Ex. In the above diagram gas is heated in the closed vessel. Interchange of energy in the form of heat can take place but matter can not exchange across its boundary.
In the isolated system neither mass nor energy cross the boundaries and it is not influenced by the surroundings. In nature isolated system can not exist.