How does currency depreciation lead to current account balancing?

It is written “the decrease in the value of the currency may restore the current account deficit to a balance”

So, how is it that if the country, that is in deficit, decreases its currency, the current account deficit would balance??

I thought that the opposite should work. If the country is in current account surplus, then, its currency should head upward.

My understanding

Current account deficit for a country means that the country sells less and buys more. And this can happen because the country’s currency is high. If it depreciates its currency, it will export (sell) more and import (buy) less. This will lead to a reduction is current account deficit. Is it?

correct, reverse also true.