Once the company you've chosen completes the analysis of your DNA, it will send you the results. Some companies will give you the option to include your results in a special database. If other customers have results that match yours, the company can contact you and the other people to let them know of the match. A match means that you share an ancestor with the other customer, though it's impossible to determine how far back that ancestor might be from the results alone.
By getting in touch with people who match your results, you may be able to fill in the gaps in your family's history. You may also discover distant cousins who split off from your branch of the family many decades ago. Your results will help the company refine its classifications -- each customer's data adds to the bigger picture.
Some testing companies create profile pages for customers on their Web sites. It's like joining an online social network. This can help you get in touch with other customers of that company who have similar results to your own.
There are also genealogy Web sites where you can create an account and post your results. You may wish to search your surname -- many surnames have Web sites dedicated for genealogical research. Or you can post the results to your own personal site. You can even post the haplogroup you belong to, but haplogroups are very general -- they just define genetic populations. A genetic population isn't necessarily linked to a particular ethnicity, culture or even geography. And the classifications for haplogroups for Y-DNA results are different than those for mtDNA results.
It's only by looking for marker matches that you'll start to uncover possible relatives. If you and another person have several markers that match, there's a chance you may be related. The more marker matches you have, the more likely you share an ancestor within a few generations.