It's... not? It's an iterative process to come to a deeper and more complete understanding of any subject, with the quality of the result being measured by how well predictions based on that understanding correspond to observation.
Science does not concern itself with "truth", it leaves that to the philosophers. Instead, it concerns itself with finding models and the (often vast) set(s) of preconditions that must hold before those models can be said to apply.
In fact, many branches of science know that they can't decide on truth, simply because of fundamental limits in what can be done by science, illustrated by things like Godel's incompleteness theorems, astrological event horizons, Heisenberg's uncertainty principle, etc. etc. etc. It's not that we don't know whether we can find truth, it's that we know that we can't, and that reality is what science works within.