Scientists make observations and try to explain them. The questions that ask why, how, when, etc., are commonly answered through a series of steps, commonly known as the scientific method. First, scientists make observations and try to come up with reasonable explanations. Such educated guesses are also known as hypothesis. A good hypothesis is testable, modifiable and fallible. This means that we can test this hypothesis, modify it (if need be) and reject it (if it is not supported). Scientists then carry out experiments to test the hypothesis. Such experiments can take place in a laboratory or field setting. The data obtained from such experiments is analyzed and is used to verify or reject the hypothesis. If the data supports the hypothesis, we can accept it as a reasonable explanation for the question. If the data does not support it completely, the hypothesis can be modified. If the data is totally against the hypothesis, we reject it and find a new one. In this way, the scientists go through a number of steps and come up with an answer for their question.
Hope this helps.