1. Most "me too" drugs are new molecular entities. For example, prozac/fluoxetine was the first SSRI approved. Subsequent SSRIs could be called "me too" drugs, even though they are different molecules. "Me too" really just means the drug is not always a big clinical improvement on what is already available - it doesn't mean it is not a new molecule.
2. Most drug companies today have a staggering (millions?) number of chemicals already made for high-throughput screening. They set up an in vitro assay that can be done very quickly (ideally it will use light absorbance or something that is easy to measure) to find the best candidate molecules called leads. These leads may or may not be optimized by chemically modifying the core lead structure to adjust it's target affinity, hydrophillicity etc. These leads are then tested in animals.
3. Molecules that do well in the in vitro test and animal tests may (and the overwhelming number of molecules do not) go on to phase I testing (safety only in healthy humans). Pass that test then it's phase II (small number of patients with disease, safety and efficacy). Pass that and finally it's phase III (large number of patients with the disease to see if the drug works with a tolerable safety profile).