From wiki - Fred brings home $100$ kg of potatoes, which (being purely mathematical potatoes) consist of $99\%$ water. He then leaves them outside overnight so that they consist of $98\%$ water. What is their new weight? The surprising answer is $50$ kg.
When I look at the problem, I assume that $99\%$ water is equal to $99$ kg and the rest is $1$ kg. When the percentage of the water is now $98\%$ the weight is now $98$ kg and the rest is $2$ kg.
I don't understand how the total weight can be $50$ kg at the end, maybe the water turns into a solid?


The water doesn't turn into a potato; it evaporates.
You assumed that the mass of the potato-water system remains the same. But the water can't become potato overnight.
Initially, we had $99$ kg water and $1$ kg potato.
Later, let there be $x$ kg water and $1$ kg potato.
Then $$\frac{x}{x+1}=\frac{98}{100}$$ $$100x=98x+98$$ $$x=49$$ $$x+1=50$$
Thus the total weight (potato$+$water) is $x+1=50$ kg.