The ending is, as it is called, the end to the game Yume Nikki.
How to get the ending (WARNING: SPOILERS)
Collect all 24 effects in the game, then return to the Nexus. Stand in the center and pinch yourself awake. After Madotsuki wakes back up, go out to the balcony. A set of stairs should have appeared. Walk up them, and you will see Madotsuki will plummet to her death, thus ending the game.
The ending scene is a black screen with a bloodstain in the center, followed by two dream jellyfish creatures walking in.