It's simple. Just make a giant block the size of your entire map, then use the carve tool to remove everything that isn't a good map.
But seriously as already said, it takes practice.
You make your first map to throw away. Don't even release it. Seriously. And after that, you still make lots of maps that you never release. Small maps to test ideas. Rooms that just have stacks of brushes just so you can understand how verticality feels from first person. Areas that are just long stretches of weird displacement practice. And so on. Whatever little random idea you get, toss it in Hammer.
And of course, play the game a lot, too. Every class. Even the classes you hate. Understanding how the classes work together and against goes a long way towards understanding what works well in a map.
Over time, those little experiments and a greater understanding of how the classes work will naturally come together in a map that you'll actually want to develop and craft into something special.