When it comes to D&D people have their own opinions and ideas on what exactly constitutes "sandbox" play. Most in the OSR community cringe at the notion of "story-centric gaming." I agree with the fact that a story-centric game isn't really about the players, but more about the DM telling a story using the PC's, who are essentially never more than "along for the ride."
That said, we can all pretty much agree on the basic concept of a "sandbox" style game as one in which the players are placed into a world, of which it is the DM's responsibility to populate with interesting places and people, and allowed the free reign to go and come to various places within the world as they see fit. The players are not necessarily driven by some over-arching epic storyline, but rather by their own choices, and how the consequences of those choices effect the world around them.
In my current campaign, using 2e rules and set in the Forgotten Realms, I'm running a sandbox style game in which the PC's can come and go as they please. My role as the DM is to present them with the environment, and the places, NPCs, and creatures to populate that environment. From there, they make their own choices. The consequences of those choices have an impact on the world, but only to an extent.
Rather than railroad them into a storyline I have prepared, I present to them things which are happening around them, and allow them to make the choices on what they want to do and where they want to go. The PCs are not the center of the universe in this game. They are merely people populating a world. Will some of their actions have large consequences on the world around them? Probably at some point, yes, but at the same time, they very well could never have any significant impact on the world around them.
The biggest challenge a DM faces running a sandbox style game, in my opinion, is in preparation. I have found that, when running a sandbox game, the DM should never be under prepared, nor should he/she spend hours preparing for one particular "site" for his players to explore, because, after all, players in a sandbox game are highly unpredictable and prone to go and do things the DM would never have prepared for. Yes, this means in some cases, you're just winging it.
The best way to handle this, I've found, is to know your world. Know your setting. Know the NPCs in your world and their motives. Give your players various adventure hooks to follow, and prepare as best you can for their choices. Just as important as the choices they do make, are the choices they don't make. If there is some secret assassination attempt in the works between one noble family and another in a city, for example, and your players choose not to pursue that hook, allow the results of this assassination to continue to play out. After all, the people of your world have their own goals, and they aren't going to sit back and wait for the PCs to foil their plans.
Keep things as loose as possible. You won't always be prepared for everything, and there's no sense trying. That's the fun and beauty of DnD, or any RPG for that matter. At the same time, give your players some kind of incentive to pursue a goal or hook. Breathe life into the world around them, and they will likely react.
It's a delicate balancing act, because despite the fact that you might be running a "sandbox" style game, there is still a "story" or series of "stories" going on in the background in the world around them. But rather than one, epic spanning story in which the PC's are the hub, the "story" is simply the acts and events of the world around them, and how the PCs fit into their world. In the sandbox game, the end is not predetermined.
Here are some tips I've found that help me DM the sandbox game.
1. Prepare a handful of adventure hooks and leads for your PCs, and write down some preliminary background info for each. When they determine which to pursue, if any, expand upon the preliminary background. Let the players give you enough time to prepare, as best you can, for the lead they wish to pursue.
2. Do not game balance. The ruins outside the city are not simply going to be full of orcs or goblins just because your party is all 2nd level. If you know there to be greater basilisks roaming through the ruins, and your PCs decide to go investigate, then by goodness let them encounter the basilisks. Remember, your job as the DM is to populate an exciting world, not to formulate every challenge so they are capable of victory at every turn. PC's should know this going in if they're playing a sandbox game. Let them know that sometimes it's okay to run away.
3. Allow for consequences for the leads or hooks the party decides not to follow. In the earlier example, I mentioned the assassination attempt. If they choose not to pursue it, allow the assassination to take place, and thus the consequences of their non-actions to unfold.
4. Do not plan on too large a scale. Yes, your world lives and breathes, but keep things simple at first. Let the immediate world around your PCs unfold as it will. After all, there are plenty of hooks and plot devices that can be used in an immediate area. You may have a general idea of things that are happening 1,000 miles away in your world, but focus more on what's happening directly around your PCs. After all, this is what they will see most. If they opt to travel 1,000 miles away, then focus on the events and people of those lands. Yes, you can have a plot in the background of a nation 1,000 miles away preparing for war on the kingdoms your PCs occupy, but keep things included in that plot local to where your PCs are.