Infinite Tsukuyomi

The Infinite Tsukiyomi is a technique which is the key to Madara's Eye of the Moon Plan. It creates an empty dimension under the user's control, which can be then filled with contents of his desire, using the power of the Shinju to do so. To trap every human being in this genjutsu, it has to be cast onto the moon's surface using the eye of the Shinju. In order to do that, one needs to become its jinchūriki. The technique is done by assimilating a person into the Shinju. Once this is done, the person is locked in a permanent genjutsu yet will live endlessly from the Shinju's power.

Obito's Limited Tsukuyomi
In Naruto 6: Road to Ninja, Obito casts a trial version of the Infinite Tsukuyomi, the, on Naruto and Sakura, which provides the alternate reality setting of the movie. Instead of casting it off of the moon, he instead used a crystal ball to serve as a medium to cast and host the alternate world.

Madara's Limited Tsukuyomi
By establishing eye contact with only a standard Sharingan, Madara can cast a limited version of the Infinite Tsukuyomi onto someone and drag them inside a dream world. While physically tethered and connected to the Demonic Statue of the Outer Path, Madara can manipulate the otherwise blank and white world to create anything he wants no matter how detailed, and control it. By doing this he can create a world exactly as he wants.

Trivia

 * In Naruto 6: Road to Ninja, when Obito uses the Limited Tsukiyomi and the reflected eye of the Ten-Tails appears, it has seven tomoe, representing the number of tailed beasts Akatsuki had captured at that time.