Through Moses God had delivered the Israelites from slavery in Egypt. Not far into their desert journey the people complain bitterly to Moses and to God because they have no water (Exodus 17:1-7.) Moses takes some of the elders and goes off to Mount Horeb (Sinai) where he strikes a rock with his staff and out comes water. Presumably the water then flowed in a wadi (a dry stream bed) back to where the people had been grumbling, a place which gets the name "Testing" and "Dispute."
It's possible to be so annoyed at the people's griping that we fail to notice God's patient, constant care for them. God is just as patient and caring with us as individuals and as a nation when we complain about God's not giving us what we want.