If you're looking for a specific type of dog or cat, websites like PetFinder.com and Adopt-a-Pet.com can be super helpful. You can customize your search preferences to match your ideal pet, and then you'll be presented with different pets that fit your needs waiting at shelters and rescues nearby.
Do a meet-and-greet with your future pet.
When you arrive at a shelter or are browsing a rescue's Facebook page, it can be very easy to just decide to adopt the first pet you see - but don't do it. When you see someone cute in a coffee shop or stumble upon a dating profile that intrigues you, you don't decide to make them your significant other immediately, right? You get to know them. You go on a few dates. You consider how their personality works with yours and how they would fit into to the rest of your life, before deciding to commit to them. That's exactly how it should work with pets, too.
If you find a pet through a rescue's website, arrange a time to meet that pet in person. If you see a pet in an enclosure at a shelter, find an area where you can take the pet out and play or walk with him. Get to know the animal you might be welcoming into your life permanently. Ask plenty of questions to people who know the animal about what he's like. Bond with the pet in question, get all of the information you need, and then use all of that to make an informed decision.