dogisgod....That's one of my favorite movies. Most of the movie is a dream by the main character (there are lots of clues of this, the first scene of Diane hitting the pillow, her saying when arriving in Hollywood that it "is a dream", the diner being called Winkies, the cowboy telling her to wake up, etc.). She had this dream just after having a hitman kill her ex-girlfriend. Her dream takes people and motifs from her real life and reappropriates them in her dream (as dreams normally do), and the dream tries to block out the murder and rationalize her guilt. But her subconscious efforts at repressing her memory of her crime fail, and real life begins to intrude more and more in her dream (the phone ringing in her room probably brings her out of her dream). Finally, when she goes to Club Silencio, she realizes she is dreaming, that all is illusion, and she is disturbed. Then the dream ends when she finds the blue key, which represents the blue key that the hitman left on her table (indicating that he had done the job), the last thing she saw when she went to bed. Then she wakes up (the cowboy tells her, "time to wake up"), and she gets up and remembers what she did. As she is remembering, we are shown the flashbacks of what led up to the murder, what she remembers from her point of view, and now we (the audience) realize that all the characters and events of the dream were inspired from random things in her life....the waitress at the diner where she met the hitman, the landlady of her apartment, the guy who stole her girlfriend, etc. After she finishes remembering what she did, her guilt reaches the breaking point, making her lose grip with reality. She gets out her gun and blows her brains out. The end.
I really loved the brilliant way the movie explored psychological issues and especially in so realistically (imho) depicting how dreams recycle stuff from one's waking life, and rather incoherently weaving them together into narrative(s) that deal with the issues that one is facing, and how the film depicted how a person achieves a semi-lucid realization that he/she is dreaming before waking up (I can think of examples of this from my own dreams).