Here's the horizon problem:
Look at the sky. Look at one side of the sky. Then look at the other side of the sky. The light from one side has just now reached you, as has the light from the other side. When we look back to the earliest observable moments of the universe, the Cosmic Microwave Background (CMB), we do the same thing. We look at light that was emitted at about the same time and has only now reached us but from opposite sides of the universe. However, we still see that everything looks the same, it has been able to homogenize. This means (barring some freak coincidence of nature) that those two regions must have been in contact at some point before the light was emitted. Clearly they aren't in contact now. After 13.8 billion years, the light is only just reaching us, halfway between the two sources. So there's no way that those points are yet in contact with each other. If we look even farther back, the same thing arises. If the universe had been expanding along the same trend that it currently is, we see that regions that could never have had any communication with each other are homogenized. This is a problem.
How could it be that two points on the opposite sides of the observable universe are homogenized even though the light from each side has only had time enough to travel half the distance between them? They couldn't have communicated. Inflation answers this question. It says that the universe was initially in a causally connected state. Everything was able to communicate and homogenize. Then the universe expanded so fast that the different regions became causally disconnected in a small amount of time.
This is how it helps. Without inflation, the universe would have started as a region where things that couldn't have ever been in contact were homogenized. But with inflation, we can now say these regions were in contact but became disconnected due to rapid expansion.