Here are some things I've learned:
Expect to make mistakes, but don't sweat it. Everyone does, especially when starting out. Your players will have fun anyway, because role-playing games are fun. DM'ing is a bit of a skill, so you'll get better the more times you do it.
Don't try to play your own character while DM'ing. Just give up playing a character while you DM. You get to play all the NPCs, so let your players play their characters. When I started, I really wanted to play, but no one else wanted to DM, so I tried to have my cake and eat it too by DM'ing and also playing a character. Big mistake. It takes time away from the other players, and most of all there's a conflict of interest. Even if there isn't one, your players will think there is. Over time I learned I really loved to DM and I didn't need or want to play a character while I DM'd.
When a player tells you that you've gotten a rule wrong, be willing to admit you're wrong and be willing to investigate it. You may want to look into it after the session is over, so as not to slow the session down. But if everyone is fine with it and it's quick to look up the rule, go ahead and do it. Tell your players from the start that you're new to DM'ing so you will try to get all the rules right, but you might make some mistakes. Assure them that you will do your best to be fair about everything. They should be patient and nice with you if they are good people. If they are jerks about it, then you don't want to play with them anyway.

Of course, the more you DM the better grasp you will have on the rules. Once again, don't sweat it. You will make mistakes, and that's OK.
Some practical tips:
Do as many rolls and setup as you can ahead of time. This includes encounter rolls or whatever. Basically you don't want to be pausing for a long time to make a lot of rolls to set something up, if you can help it. Any rolls and setup you can do before the session begins helps a lot.
You don't want to railroad the adventure of course, but you will probably have an idea of what your players may do given the scenario they are presented with. So make a play-list of sorts, outlining the possible and probable encounters and story plot elements they will come across. This will help you organize things in your mind and keep your flow smooth. Your players WILL do some unexpected things and make unexpected choices. So just go with it. Move story plot elements around on the fly as needed. Have some backup encounters ready that you can just throw in anywhere if you need to.
Get all your monsters together ahead of time so you can transition to the fight as smoothly as possible. So, this might mean writing down all the monsters they will fight in a notebook, with their hitpoints and whatnot, ahead of time. It might mean bookmarking the monsters in the monster manual.
My monster manual fell apart, and so I took every page and put them in individual plastic page protectors and put them in a big binder. So now when I set up a session, I can take the individual pages of monsters they will encounter out of the binder, and put them neatly in a spot where I can use them. It eliminates flipping through the monster manual. As a bonus, I can use dry erase on the plastic covers, to mark off spell slots used for the casters.
Speaking of spells, if you have any magic caster monsters, familiarize yourself with their spells, so you don't have to flip through the PHB constantly. Make notes if you need to. Also, for any encounter, take some time to think about the tactics the monsters will use, or the spells they will likely use, ahead of time. So when you get to the battle, you don't have to waste time figuring that out then.
All these things should help with the flow.
For all my players, I write their characters' names down on blank index cards. I fold the index cards in half and write the names on both sides. Then I simply put the cards on my DM screen in the order of their initiative roll. That makes it easy for everyone to see who is about to go next. (I make generic cards for groups of monsters. M1, M2, M3, etc.) Because your players can see when they are about to act, it helps to remind them to think about what they will do on their turn, which also speeds up play. I also use a clothes pin and put it over each card as we go through initiative order, so that I don't lose track or skip anyone.