In order to maintain the proper levels, many negative feedback loops are utilized. Something triggers the release of something, which then inhibits the release of more. The classic example is a thermostat. When the temperature drops down below a set level, the furnace kicks on and puts out heat. Once the temperature has reached the proper level, that shuts the furnace off. If it didn't have the negative feedback, the furnace would never shut off.
Here is an example in the body, with blood pressure.
Just FYI, there are some positive feedback loops in the body as well, which do not contribute to homeostasis, but have different functions. Eventually the stimulus resolves itself so the positive feedback goes away. An example is birth. Stretching of the cervix releases oxytocin which increases contractions, which makes cervix stretch more, which increases oxytocin, and so on, until the baby is born and that stimulus is resolved.