Depending on how many generations were included, this is a possibility plus Ancestry.com is only compiling information from what's on their web site. It is not necessarily complete. Now that you have these names, compare them with what you know about your family.
If you are brand new to genealogical research, a great way to begin is to talk to your various family members, especially the more senior ones, and ask them questions so you can gather names, dates, places, and stories. With that information in hand, you can begin to gather records about these family members and the places associated with them.
For more ideas, please check NARA's web site at Resources for Genealogists and Family Historians
From what I've read, they compare your DNA with others who have also been tested. The family trees of the matching DNA sets - dating back as far as they go - are then matched based on similar surnames on those trees.
This does not mean that the people you match with would necessarily have your surname today. It just means that at some point in both of your family trees relatives shared surnames and you have similar DNA according to the test.
You can imagine how removed the relation can be after hundreds of years. Also, the accuracy can shrink to as low as 10% when you're talking distant cousins.
All that a DNA match means on Ancestry is that somewhere along the line your matches have a shared ancestor with you. Since Ancestry's test uses autosomal DNA, it is using information that has been passed down in your DNA by both your parents. Your matches could be cousins from either side, and may not even have a shared ancestor for 5 or 6 generations.
If you're looking specifically for information on your last name, I would recommend looking into joining a DNA project for your surname of interest. These projects focus on testing using Y-DNA down the male line (women interested in them can have a male relative on their paternal line take the test) and can narrow down possible lines of descent from a particular ancestor with that surname.