Well really you can play Dungeons and Dragons anywhere, but if you're trying to find other players there are a few ways to go about this. The first and easiest way to find a group would be to go to your local game shop or hobby store and see if they're hosting any games. It's very common for a group to be playing in a back room at stores like this and the employees would likely know if they're looking for new players.
Hobby stores also sometimes host events called “Adventurers League” where players can play new officially licensed adventures and are always welcoming new players with ready made sheets. If you want to try Dungeons and Dragons but don't know for sure, Adventurer's League would be a great place to start. You can find a link here to explain more about Adventurers League.
Quick note, I've never participated in Adventurers League myself but I have heard a lot about it and would have loved to play it at some point.
Another option for those looking for other players but don't know where to look would be the site Roll20. There you can host and play D&D over your computer screen. It has loads of maps and tokens and dice rollers for you to use, allowing you to play either through their chat system or via a voice chat like Twitch or Skype. They also have a compendium of rules and statistics for monsters and spells, so if you want quick references while you play they're within reach. You can find them through this link here.
This option works great for players who live too far away from brick and mortar stores or don't have any other players nearby, allowing you to play D&D with anyone in the entire world. With this site you can make your own party or try to find a party looking for another player. Just remember to be nice, especially over the internet.
And finally you can always try to host a session yourself in your own home. (or that of a friend's) This is the option I usually use as it's much easier to have fun in your own home, assuming you can fit enough people in one place. I have a big dinner table that I use to fit all the maps for the session and I draw out the areas the players visit.
This option works best for those who want to run long sessions for hours at a time, as you won't need to pack up early if the store closes for the night. The group I run at my place usually plays from 4pm until nearly midnight each week, allowing use to go through a lot of material really quickly.
Regardless of if you decide to host a session at your own home or find a group elsewhere, make sure to have enough snacks handy for youand other your other players. Nobody likes to stop the adventuring to go get some snacks, so prepare them ahead of time.