The law of attraction states that you will attract into your life—whether wanted or unwanted—whatever you give your energy, focus and attention to.
You are constantly giving off vibrations of energy when you think and feel. These vibrations can be picked up and received by other people. That's why people say, "He has good vibes," or "He gives off bad vibes." You are constantly giving off vibrations—literally. If you're feeling excited, enthusiastic, passionate, happy, joyful, loving, appreciative, abundant, prosperous, relaxed or peaceful, you are giving off positive vibrations.
On the other hand, if you're feeling bored, anxious, worried, confused, sad, lonely, hurt, angry, resentful, guilty, disappointed, frustrated, overwhelmed, stressed out or depressed, then you are giving off negative vibrations.
The law of attraction states that the universe responds to whatever you are offering—by giving you more of whatever you are vibrating. It doesn't care whether it is good for you or not; it simply responds to your vibration. (If you saw the film "The Secret," you saw this explained in great detail.)
The problem is that most of the time, you are not aware of what vibration you are offering. You are simply responding to things outside of you—current events, the news, how people treat you, the stock market, how much money you are making, how your children are doing in school, whether or not your favorite sports team wins—and then having a feeling that is either positive or negative.
When you are simply responding unconsciously to what happens around you, you tend to stay "stuck" in your current condition. This is why most people's lives never seem to change very much. They get stuck in a repeating cycle of recreating the same reality over and over by the vibration they are sending out.
It works like this: First you observe what you currently have and are currently receiving in your life. You call this your "reality." You respond to what you observe with a feeling, positive or negative, which then gives off that vibration to the universe. The law of attraction then responds to this vibration and brings you more of what you were vibrating. This keeps the cycle going over and over, until you choose to change it through the exertion of your will. You are a victim of your lack of awareness of the law of attraction.