The story of Moses and the Amalekites starts off with a little episode that everyone knows. That's the one where the Israelites were all dying of thirst and went to Moses to gripe about it.
The Israelites were constant complainers. Just because they had no food or no water and were dying in the desert heat, all they could do was complain! And each time, they said they would have rather stayed in Egypt. At this point Moses was probably wishing they had, too.
Well, we know what happened. Moses went out and struck the rock at Horeb and water came forth. So for the moment the Israelites quit complaining. But they still kept it up off and on for about forty years. Eventually God himself got so tired of their bellyaching that he sent a bunch of deadly snakes to bite the Israelites and take care of their complaining once and for all. After all, if he was going to end up with a Promised Land full of crybabies, then the Canaanites were welcome to it. But after the stuff with the snakes, the Israelites got the hint and finally ended up living alongside the Canaanites.
But it was a long hard road to the Promised Land, and along they way they encountered the Amalekites. A lot of wind has been expended trying to find out who the Amalekites were. About all you can say is they were a tribe being led by a fellow named Amalek, they were a Semitic people (like the Hebrews), and from their tactics (mostly sneaking up from behind) you can say they were desert raiders trying to make a living. Now a lot of people point out they were pretty mean since they killed women, children, and elderly Israelites. But at the same time, God did the same thing using the snakes. So given the time and place and circumstances maybe we shouldn't be too hard on Amalek and his tribe.
But they were still the enemies of Israel and so when the two groups got together there was usually a fight. After Moses got the water from the rock, the Amalekites showed up. By this point, it was Joshua who did most of the actual fighting for the Israelites.
So Moses told Joshua, "Choose men for us and go out, fight against Amalek. Tomorrow I will station myself on the top of the hill with the rod of God in my hand." Moses was over eighty and knew he wasn't really the best man to do the actual fighting. It also shows that by going to the top of a hill when the fighting was down in the valley that Moses was also no dummy.
Well, the next day Joshua went out to fight and Moses, his brother Aaron, and their friend Hur went up to the top of the hill. The battle didn't quite go as planned. We know that Moses made some kind of gesture with his hands (no, it wasn't that gesture) so that the Israelites started to win if he kept his hands up, and if he let his hands down, the Amalekites "prevailed".
Moses, of course, was no spring chicken. So after a while he started getting tired and sat down on a rock. To make sure the Israelites won, Aaron and Hur held his hands up "one on either side" until the evening when battle was finally over.
According to the story, Joshua "overwhelmed" Amalek and his people, and the Israelites went on about their business of getting to the Promised Land, griping all the way. But before they headed on, the Lord told Moses to recite the story of the defeat of the Amalekites to Joshua although you'd figure Joshua knew about it already. The point, we're told, was that Joshua would write everything down as a memorial to "utterly blot out the memory of Amalek from under heaven."
So to "utterly blot out" the memory of someone you write a memorial? A memorial that ends up in the Bible? In the most printed and widely circulated book in the history of the world?
Oh, well, you can't really expect God to think of everything, can you?