They were not very successful, but not for a want of trying.
The ancient greeks tried to measure the angle between the sun and the moon when the moon is half full. They got a value of 87 degrees, (when really it is 89.85). From this they could estimate the relative distances of the Moon and the sun.
Further observations of the moon from different locations on Earth could, in principle find the relative distance to the moon in terms of the radius of the Earth. And the radius of the Earth could be determined by noting the different lengths of shadows at the same time in different locations.
Several Greeks attempted to put these together to find the distance of the sun, and while their methods were geometrically correct, their observations were not accurate enough to achieve an accurate value for the distance of the sun. Typically they estimates were about 5% of the true distance. Attempts based on similar methods were made in other centres of astronomy, in China, India and the Middle East. They all tended to dramatically underestimate the distance.
Even after the invention of the telescope allowed the observations to be done more accurately the distance was usually under-estimated. only when careful measurements of the transit of Venus were made, was Jerome Lalande able to calculate the distance of Venus, and use Kepler's laws to derive the distance of the sun and other planets.
Kepler had created a model of the solar system that predicted the relative distances of each planet very successfully, but not the absolute distance
Nearly all other distances are based on the Earth-sun distance. The distances of the planets can be found using Kepler's laws. The actual distance of stars was unknown we were able to measure the slight change in position of a star as the Earth orbits the sun. If you know the distance to the sun you can calculate the distance to a star. Prior to the observation of this "stellar parallax" estimates of the distanct to stars was essentially guesses, and usually significant underestimates.
So prior to radar ranging, the methods were geometric, and based on a ladder of measurements. The size of the Earth was used to determine the distance to the moon and sun. Then the distance to the sun was used to find the distance to the stars.
For more distant stars there can be considerable uncertainty about the distance. If a star is too far to have parallax, then it's true distance will not be known to accuracy.