Closed space, (閉鎖空間 Heisa Kuukan), also translated as sealed reality or sealed space, is an alternate dimension which overlaps reality.
Haruhi Suzumiya's Closed Space
When Haruhi Suzumiya's emotions become unbalanced, closed space is created in a limited area as a way for her to release her anger and frustration through creatures called celestials. It is the duty of an 'Agency' esper to remove the celestials, which destroys the space.
Closed space is characterized by gray skies and loneliness.
Esper Itsuki Koizumi pointed out that Haruhi's depression does not cause closed space, only frustration. He asked Kyon to avoid doing anything which would trigger Haruhi to create closed space (in other words, keep her happy and entertained).
Koizumi believes that if the closed space is not shut down, reality can be permanently altered in the area, and believes that Haruhi may in fact have altered the entire world one or more times previously.
There are several times in the series that Haruhi's closed space are shown to Kyon: once when Itsuki Koizumi shows him his powers as an esper, and once when Kyon and Haruhi wake up in one at school (having seemingly been teleported there). The latter case was particularly unusual, as neither normally could enter closed space without esper assistance. Kyon went to sleep at his house but woke up at school, along with Haruhi. The space was different than normal; Koizumi was only able to enter when given power from the other espers, and even then could not last there long due to running out of power. The last time, Kyon found himself in a combination between Haruhi and Sasaki's spaces, which were "at war" with one another.
After Kyon resolved the school closed space situation by "calming" Haruhi's frustration, closed space occurred only rarely. The next incident occurred when Haruhi got frustrated by losing a baseball game, but it was resolved when the SOS Brigade managed to pull off an unlikely victory. Haruhi specifically did not create closed space after fighting with Kyon in The Sigh of Haruhi Suzumiya because she was feeling depression rather than anger. Initially Koizumi was worried, asking Kyon not to do things that could cause Haruhi to create closed space. A worried Kyon cheered her up.
Kyon professed not to care if Haruhi lost her temper during The Day of Sagittarius (which could cause closed space to appear), saying she would need to learn her lesson one day. Koizumi took this as a sign of trust between Haruhi and Kyon.
By the next year, Koizumi was feeling complacent about the creation of closed space, as he hadn't dealt with it in some time.
After Haruhi met Sasaki during spring break, however, Haruhi began creating much closed space again because Sasaki introduced herself as Kyon's "close friend". However, the celestials did not attack, acting as if they (and Haruhi) were in a daze. The 'Agency' was still forced to destroy them.
In the α timeline, the incidence of closed space decreased; Koizumi believed this was because Haruhi planned on adding first-year students to the Brigade, and had her mind on things other than Sasaki.
In the β timeline, they also decreased. Koizumi believed this was due to her worries over Nagato's illness. However, he was wary of making a mistake; the celestials could be marshaling their strength instead. Koizumi believed that avatars accelerated the process of creating sealed reality.
As the timelines merged, so did the two versions of closed space. Despite Haruhi's captivity at the hands of Fujiwara and Kuyou Suou, Haruhi's closed space still formed, as she had somehow "split" herself into two, with Yasumi Watahashi acting as Haruhi's "other half" and generating the closed space anyway.
Sasaki's Closed Space
Sasaki creates an alternate version of closed space, in which the world is entirely white or clear sepia/cream and it encloses the entire world, along with the fact that there are no celestials. However, they are devoid of any other change at all. Esper Kyouko Tachibana was able to show this to Kyon just by holding his hand. The two did a "spirit walk" around the space until they returned to their original positions. They had only held hands for ten seconds in the real world, but the trip seemed much longer.
It can hedge visitors in with a "force field", and visitors can be admitted by Tachibana physically as well as through the "spirit walk".