The Islamic account is told most fully in hadith rather than in the Quran, and the fullest version is transmitted from Ibn Abbas in the collection of al-Bukhari. Ibrahim brings Hajar and the infant Ismail to a bare valley where nothing grows, leaves a bag of dates and a skin of water, and turns to go. She asks him whether God has commanded this, and when he says yes, she answers that then God will not abandon them, and lets him go.
When the water is finished and the child is in distress she climbs the hill of Safa to look for anyone, sees nobody, crosses the valley floor at a run because the ground dips, climbs Marwa, and repeats it seven times. Then she hears a sound and finds water running at the child's feet, and she banks it with sand so it will not drain away. The narration derives the well's name from what she said as she did it.
That water is Zamzam, and the running is the sa'i, one of the required acts of both the hajj and the umrah. Every pilgrim who comes to Mecca retraces a slave woman's search for water for her son, seven times between the two hills, now enclosed within the mosque. The tradition also places her grave in the semicircular area beside the Kaaba, so that the building is oriented around the household she kept alive.
The contrast with the Genesis account is worth stating plainly. The same woman who is sent away in one scripture is, in the other, the reason a rite exists and the ancestress of a people, and her endurance is what the pilgrimage repeats.