Put the water to a boil, add just a little more than the amount of the recipe (for evaporation).
Meanwhile, chop onions and mince the garlic.
Bring a pan to medium heat and add the oil. When the oil gets hot, add the onion, garlic, salt and sauté until withered. Keep stirring to avoid it burning and golden.
Add the rice and sauté well, for about 1 minute - this step is very important to seal the rice properly.
Now, measure two cups of boiling water and pour over the rice. Stir with the spoon to spread the rice from the bottom of the pan.
Wait for the water to boil again. Then, lower the heat and partially cover the pan.
From now on do not stir the rice until it absorbs all the water. The time depends on the pot, but it is usually around 15-20 minutes.
To check that the rice has absorbed all the water, gently remove some grains of rice with the help of a fork until you see the bottom of the pan. If you still have water in the bottom, wait a few more minutes.
When the water is dry, cover the pan and let the rice rest for 5 minutes - this step is essential.
Now, just fluff the rice with a fork and serve while still hot.