The literal meaning of karma is action. Action in this case needs to be defined not as an impulse at the physical level, but an impulse at a subtle or psychological level. Hence, thinking is action. Everything that you think creates vibrations and leaves impressions. The Buddha said that one’s whole life consists of one’s thoughts. This is the best definition of karma I have ever found. You caused the life that you are now living. You may think that the reality that you have created is very ugly, but at the moment you created it you thought that this was the best that could be accomplished. That’s why you created it. When did you create it? You created it in a number of previous births. The desire to create this reality was so intense that you ended up creating it. Nobody was responsible but you. Why did you do this? You did not know any better at the time you created it.
Once a psychological reality becomes a material reality, it is very difficult to undo it. I am not saying it is impossible, only very difficult. At the thought level, the reality is like water, but at the material level, it has become like ice, very solid and very real. It takes time to diffuse it. The reality that has become material is called prarabdha in Sanskrit.