Your program loops over every possible number one-by-one until it finds the solution. This is the brute force solution. Project Euler questions are designed to foil brute force approaches. It requires cleverness to improve upon the direct approach. Sometimes that means refining your answer. Sometimes it means completely rethinking it.
Refine
This problem is a great example. You could make some incremental improvements to your algorithm. For instance, you know the answer must be even, so why not skip odd numbers?
x = x + 2
In fact, it must be divisible by 3, so we could even count in multiples of 6.
x = x + 6
And it must be divisible by 5, right? Heck, let's count 30 at a time. Now we're cooking!
x = x + 30
You could keep following this line of thinking and make the increment bigger and bigger. But this would be a good time to step back. Let's rethink this whole approach. Do we need to iterate at all? Where's this all headed?
Rethink
If we multiplied together 1×2×3×4×5...×19×20, we'd have a number that is divisible by one through twenty. But it wouldn't be the smallest such number.
Why is that? Well, the reason it's too big is because of the overlap between numbers. We don't have to multiply by 2 if we're going to multiply by 4. We don't have to multiply by 3 if we're going to multiply by 6.
The breakthrough is to multiply just the prime factors. We don't need 6 because we'll already have 2 and 3. We don't need 9 if we multiply two 3's.
The question is, how many of each prime factor do we need? How many 2's? How many 3's? The answer: we need enough to cover the numbers up to 20. We'll need up to four 2's because 16 = 24. We don't need five, because no number has five 2's in it. We'll need two 3's to handle 9 and 18. And we'll only need one each of 5, 7, 11, 13, 17, and 19—no number has those more than once.
And with that, we can calculate the answer by hand. We don't even need a program!
24 × 32 × 5 × 7 × 11 × 13 × 17 × 19 = 232,792,560