Determine if the cat is feral or friendly. Feral cats tend to avoid people. Most feral cats are too scared to be handled. If the cat is avoiding you do not try to pick it up – you could be seriously bit or scratched. If feral you should contact shelters in your area to see if they do TNR (trap neuter release). The cat will be trapped, neutered or spayed and returned to your neighborhood and someone in the neighborhood will need to feed these cats.
If the cat is friendly capture the cat and take it to a vet and ask them to check for a microchip. Vets will do this free of charge. If it has a chip an attempt can be made to return it to its owner. The vet will explain how this can be done.
If the cat does not have a chip ask around your neighborhood to see if anyone knows who owns the cat. Watch for signs posted looking for lost cats and check lost and found web sites advertising cats that have been lost. Post its picture on a lost and found website. At some point you may have to decide if you are willing to make a commitment to the cat by giving it a home or try to find a shelter that is accepting cats. When you make this decision keep in mind that no-kill shelters are full most of the time and if you take it to a kill shelter the cat has a good chance of being euthanized.
If you decide to give the cat a home make a vet appointment have the cat tested for FELV and FIV, give shots, worm the cat, treat for fleas and have it spayed or neutered. If the cat tests positive for FELV and/or FIV do not euthanize the cat. These cats can live a long time and if you do not currently have a cat then a valid reason for not keeping the cat does not exist. If you have a cat or cats and do not want to expose them to the new cat then call the shelters to see if anyone will accept a FELV+ or FIV+ cat.
Please keep the cat inside. There are many life threatening dangers to cats that live outside.
Last but not least, enjoy the company of your new friend!