A female can have their father or paternal grandfather tested. If that is not an option, look for a brother, uncle, cousin, or other direct male descendant of the male line you're interested in testing.
How Y-DNA Testing Works:
Y-DNA results have no real meaning when taken on their own. The value comes in comparing your specific results, or haplotype, with other individuals to whom you think you are related to see how many of your markers match. Matching numbers at most or all of the tested markers can indicate a shared ancestor. Depending upon the number of exact matches, and the number of markers tested, you can also determine approximately how recently this common ancestor was likely to have lived (within 5 generations, 16 generations, etc.).
How Many Markers Should You Have Tested?:
Example: You have 12 markers tested, and you find that you are an exact (12 for 12) match to another individual. This tells you that there is about a 50% chance that the two of you share a common ancestor within 7 generations, and a 95% chance that the common ancestor is within 23 generations. If you tested 67 markers, however, and found an exact (67 for 67) match with another individual, then there is a 50% chance that the two of you share a common ancestor within two generations, and a 95% chance that the common ancestor is within 6 generations.
The more STR markers, the greater the cost of the test. If cost is a serious factor, then you may want to consider starting with a smaller number of markers, and then upgrade at a later date if warranted. Generally, a test of at least 37-markers is preferred if your goal is to determine whether you descend from a specific ancestor or ancestral line. Very rare surnames may be able to obtain a useful result with as few as 12-markers.
Join a Surname Project
Since DNA testing cannot on its own identify the common ancestor that you share with another individual, a useful application of the Y-DNA test is the Surname Project, which brings together the results of many tested males with the same surname to help determine how (and if) they are related to each other. Many Surname Projects are hosted by testing companies, and you can often receive a discount on your DNA test if you order it directly through a DNA surname project. Some testing companies also give people the option to only share their results with people in their surname project, so you could potentially miss some matches if you are not a member of the project.
Surname projects generally have their own website run by a project administrator. Many are hosted by the testing companies, while some are hosted privately. WorldFamilies.net also offers free project websites for surname projects, so you can find many there. To see if a surname project exists for your surname, begin with the Surname Search feature of your testing company. An internet search for your surname "dna study" or "dna project" will also often find them. Each project has an administrator you can contact with any questions.
If you can't locate a project for your surname, you can also start one. The International Society of Genetic Genealogy offers tips for starting and running a DNA Surname Project - select the "For Admins" link on the left-hand side of the page.