How do ectothermic organisms regulate their body temperature?
By various behavioral & physiological mechanisms that relies almost completely on the environment.
Ectotherms have no internal heat regulation mechanism like endotherms. Thus, making them heavily reliant on external heat sources to maintain their bodies in a physiologically functioning temperature.
These mechanisms can be classified into two different ways:
1) Behavioral Mechanisms:
Mainly means absorbing heat from the sun during the day or before heat-reducing activities (flying, swimming) and taking shelter from high sources of heat.
This is why you see butterflies, reptiles, frogs, and other ectotherms bask in the sun with their body spread out to increase the surface area for more heat absorption. And when it's too hot, you see them hiding in the shade or near bodies of water.
Some animals exhibit group behavioral mechanisms. A good example is how honey bees cuddle together in large groups to retain & generate heat (it should be noted that this is also an attack mechanism for larger prays attacking the beehive). A similar example is how some gregarious caterpillars bask in the sun in large groups to cluster heat.
B) Physiological Mechanisms:
These act in a similar but not identical to endotherms heat regulation. They vary from molecular level mechanisms, organ level mechanisms, and body level mechanisms.
Molecular level example; increase or decrease of cell phospholipid saturation to increase or decrease melting point of call membrane and other cellular organelles.
Organ level examples; heat exchange between the cold blood coming from the skin with hot blood coming from the core. Another example is the increased secretions of mucus on some amphibians' skins to cool the body with evaporation.
Body level example; torpor of animals for different periods of time to conserve energy and heat. It can occur on daily basis or up to several years (hibernation).
I hope this answered your question.