This was one of the primary problems that needed to be solved in helicopter flight.
In my example, I'll use a 2 bladed helicopter, but this holds true with all helicopters, and I'll explain some of the different rotor types later on. The blade that is moving forward, relative to the direction of the helicopter, is called the advancing blade. The opposite is called the retreating blade, and you are correct in assuming that they would generate different amounts of lift. As a previous commenter noted, the term used for this is "dissymmetry of lift", and is the same thing that limits the maximum speed of a helicopter.
A two bladed helicopter will generally have what is called a "semi-rigid" rotor system. Semi rigid systems are only possible on even bladed helicopters, and are generally only used on 2 bladed helicopters. The two blades are connected together by a hinge on the rotor hub (where the blade meets the helicopter), and if you push down one blade, the other blade moves upward, and vise versa. What happens as you move forward is that the advancing blade (the one generating more lift) will get pulled up with a greater force than the retreating blade (the one generating less lift). As the advancing blade rises up (because of its additional lift), it pushes the retreating blade down. This advancing blade, in pushing up the rotor, is reducing the angle of attack of the blade against the airflow, which in turn is going to reduce its lift. The retreating blade is hinging downwards, which is increasing its angle of attack against the airflow, which will increase the lift it provides. These two forces will work against each other until they are in balance, which means that the advancing blade and the retreating blade will even out in the lift they are generating, which removes the dissymmetry of lift.
The blades in a helicopter are spinning at a some speed, which varies depending on where on the blade you are talking about (the tip or near the rotor hub, for example), but to simplify this explanation, I'm going to assume that the blade is traveling at the same speed along its entire length. Let's say that the blade is spinning around at 100mph at its tip. As the helicopter moves forward, at let's say 50mph, then we have one blade that is moving against the air at 150mph (the advancing blade), and one that is moving against the air at 50mph (the retreating blade). As the helicopter gets closer to 100mph (the speed of the blades), at some point, the speed of the air against the retreating blade will get closer and closer to 0. When it hits 0, it will stop generating lift, and the helicopter will start to roll (now the rotor is only generating lift on one side). This effect, called retreating blade stall, is one of the reasons why helicopters are limited in their top speed.
Just as a side note, I have greatly simplified some of these explanations, so I am well aware that I have glossed over various parts of this explanation to simplify it.