Millikan used batteries to charge two parallel plates. The top one was positive and the bottom one was negative. By adjusting the voltage he was able to change the electric field strength (E).
He sprayed a mist of oil droplets between the plates (negatively charged, because they gained electrons from friction). The mass (m) of the oil droplets was determined based on the volume and density.
Because the oil droplets were negatively charged and the positive plate was on the top, the electric and gravitational force worked opposite each other. When they were equal, the oil droplet would be suspended between the plates. Since this experiment was done on Earth, the value of g was 9.81N/kg.
Using Fg=mg and Fe=Eq, since Fg=Fe, mg=Eq, meaning q=mg/E where m is the mass of the oil droplet determined by the volume and density, g is 9.81N/kg because of the Earth, and E is known from adjusting the voltage on the batteries.
The charge values looked like (not actually) 56, 77, 35, 35, 70 … therefore, Millikan was able to determine the charge of an electron by finding the lowest common multiple of his results.