Wow! That is a complicated question. Let me give it a shot. Think about this. If you are standing still and throw a ball at a target, it goes straight to the target, right? Now, if you were riding a bike and tired to throw the ball at the target, you would see that the forward movement of the bike would cause the ball to miss the target. So you have to compensate for your movement to hit the target. Same is true in airplanes.
In the early days, the person dropping the bomb (known as the Bombardier) would take a guess at when the best time was to release the bomb so it would hit the target. That method was not too accurate at all. In World War II, the Norden Bomb sight was developed. It had a very simple mechanical computer inside that compensated for the altitude and speed of the airplane. It made bombing missions more precise. But it still wasn’t perfect.
Today, laser guided bombs have increased the accuracy even further. But no matter which method is used, flight crews still have to practice to make sure they are as accurate as possible.
Hope that helps and don’t fall off your bike trying to throw the ball at the target!