Ibn Ezra said that only the above ground water (such as in the river) turned to blood, but water that was underground before the plague stayed water.
"And all of Egypt dug around the river to find water to drink" (7:24)
Thus , when the Egyptian magicians needed water to emulate the plague, they dug a new well See Ibn Ezra on Vaeira 7:22
ויש שואלים: הלא כל המים נהפכו לדם, ואנה מצאו החרטומים מים והפכום.
והתשובה: אמת, כי כל המים הנראים למעלה נהפכו לדם. והעד: כי היו שותים
מהמים שחפרו (שמות ז׳:כ״ד), גם כן חפרו הם.
The medrash Rabbah states that the Egyptians were able to buy water from the Bnei Yisrael and it would remain clear. Thus, the magicians could buy water and use their magic to turn it into "blood".
I am sure that someone asks how the Egyptians survived for seven days without water. Besides to answers above, we can say the following. Note that Egypt was a major beer producer so that they could drink beer for seven days. Also, the Masai tribe of Africa drink blood from their herd animals. Thus, if the Egyptians got thirsty enough, they could drink the blood and survive. However, that has nothing to do with this particular question.
There are commentators such as Rabbeinu Bachya that say that actually it should be read "had shown that they could turn water into blood". This means that it was already known that the magicians could do this and that Par'oh pointed this out. Thus, he claimed that Moshe and Aharon were merely super powerful wizards. This is analogous to the medrash about the staffs in which Par'oh laughs and says "this is a common trick that even children can do". According to this, they did not need to change water into "blood" at that time because it was already known that they can do so. One point is that if Moshe had shown the second sign to the Egyptians (the Torah does not mention him showing any sign other than the staffs to the Egyptians), they would have demonstrated their ability to duplicate it then.
Rabbeinu Bachya says that they took advantage of the gap between the warning and the actual plague to show Par'o that they could do it also.
Malbim cites Sa'adiah Gaon that only drinkable water was turned into blood. Thus, they took contaminated water (such as salty from the sea) and changed it into blood.
I checked Rabbi Sorotzkin and he brought up the possibility that they got the water from Goshen or that they stepped beyond the border of Egypt into another country to get the water to change. Other meforshim ask why they changed water to blood since it was just making things worse. They point out that if they could have changed a little bit of blood to water and back, that would have given Par'oh a "reason" to think that his magicians were more powerful than Moshe and Aharon. Thus, they had to find water that had not changed.