What does it mean to be refining something in the cultivation novels?

Refine has two meanings in my language (I'm Brazilian)

1 - Make a product go through a series of operations that remove impurities and excess.

2 - Make it thinner.

I've seen cases where the first option literally happens. For example, our bodies are refined by Qi and training, ok, but there are times when “refining”, “being refining” seems like a thrown word.

Is transforming one thing into another refining?

This junior apologizes for his lack of understanding.