Re: Transitioning from a player to a GM
I second the "try it and see what happens" approach, and try to figure out what style works best for you. One nice thing about starting DMing with a completely new group is that you'll tend to adapt to eachother's styles subconsciously (at least, that was my experience).
On the subject of preparation-verses-improv, I recommend starting off by trying a little of both. Prepare some basics about important NPCs and areas, prepare some basic encounters, but don't worry about fleshing them out too much in planning. If your players go off the rails, you can transplant pre-planned NPCs and encounters into their path, possibly after applying a name change and a fresh coat of paint. Have vague story ideas and goals, but let the specifics emerge though gameplay.