The law of attraction is based on the idea that everything in the universe has a polarity, meaning that everything - from the food you eat to the people you talk to to the things you say to the things you think - contains either a positive or a negative kind of energy. Notice that being with people who complain or rant a lot tends to make you feel bad, even though you're not exactly experiencing what they're going through - that's the law of attraction working its magic. When you focus on negative stuff, then more negative stuff will happen to you. On the other hand, when you focus on positive stuff, then more positive stuff will happen to you.
Fortunately, there is a way to manipulate the law of attraction and make it work for you: by changing your beliefs using the power of positive affirmation. Positive affirmations give you a fresh pair of eyes to see the world and therefore give you courage to achieve a lot of things you never knew were possible.