Every story has a setting the location in which it takes place. But SF/F stories are special; each one may have a world that's different from our own in important ways. Some SF/F stories have whole universes built around them, which may include alien planets or magical realms, and characters (human or otherwise) with problems that may seem quite otherworldly to us. Or sometimes it's the other way around; the characters' problems are startlingly familiar, despite the strange places in which they live.
Every story has its own needs, and world building is the process of creating the realistic setting that helps your story come to life.
In movie terms, a good example of world building is the original Star Wars. One of the qualities that made this movie such a hit was the intense illusion of realism created by the set designers, model makers, makeup artists, and others. Instead of the gleaming surfaces that had been so common in earlier SF movies, everything in Star Wars seemed used and broken in. Think of Luke's speeder, worn and grimy with use, or the Jawa's hulking sand crawler. The total effect was a powerful sense that this is a real place where people live.
That's the effect you're after when you write a story.
Here are some examples of imaginative, and yet highly logical, world building: