In this chapter, Moses and Aaron confront Pharaoh and he responds by increasing their labors as punishment.
Moses and Aaron tell Pharaoh the people must leave to go celebrate a feast, and Pharaoh is pissed. He decides that the best course of action is to give them more work, so that they forget the LORD and their desire to leave.
When it says the foremen were beaten, just note that the taskmasters here are Egyptian, and each taskmaster is over a group of foremen. Each foreman is Hebrew and responsible for a group of Israelites. So if the Israelites fail to deliver their load of bricks, the foreman is the person punished. So the foremen are the people between the metaphorical "rock and a hard place" (Pharaoh pressuring them for more bricks on one hand, their assigned Hebrew slaves on the other).
In the end, the foremen complain to Pharaoh and that goes nowhere, so they complain to Moses and Aaron too for putting them into this difficult position. Complains always flow to the top, so when the foremen complain to Moses, Moses goes ahead and complains to God. :) Apparently Moses expected everything to go smoothly and swiftly? Of course, this is contrary to what God says when he said that Pharaoh would only release the Israelites under compulsion, and that God would "stretch out My hand and strike Egypt with all My miracles which I shall do in the midst of it; and after that he will let you go." I suppose Moses wanted all the miracles right away, which is an understandable (though, apparently, unrealistic) expectation.
It's also amusing to me to see the Hebrew foremen go to Pharaoh and blame him for the problem ("There is no straw given to your servants, yet they keep saying to us, ‘Make bricks!’ And behold, your servants are being beaten; but it is the fault of your own people."). You can tell the foremen are frustrated by being told to do the impossible and punished when they can't. When it says that the people gathered stubble for straw, we can tell there is not much straw to be found, because stubble would make a poor substitute. This is clearly a big problem for the Israelites, and this is another one of those human touches that I love about the bible.
Moses demonstrates much of the reticence and fear that we have seen in the prior two chapters. Now that things are going adversely (in the short term), Moses immediately reacts negatively. This is in line with his character that we have observed.
From Pharaoh's point of view, I think part of this is Pharaoh viewing their request as the Hebrews "getting uppity", and so he wants to punish them in retaliation, to establish his domination over them. I do think another part is, as I've stated above, he wants to bury them in work so that they do not think of God or anything else. Based on what I mentioned in the analysis of chapters 3 and 4, I think one of the primary views on this story is that of the revelation of God's power. We saw God granting Moses the power of miracles and God expressing his dominion over natural creation ("Who has made man's mouth?"). Pharaoh, I think, also views this as a power struggle between himself and the Israelites, and thus it is Pharaoh who is the primary foil to God's strength. That is, while Pharaoh is looking to express his dominance over the Hebrew slaves, the LORD is using this provocation to express his dominance over Pharaoh. Therefore Pharaoh is symbolic of things much greater than himself. In the OT, which expresses and interprets things physically, Pharaoh is generally symbolic of all human power and the power of the nations. Later we will see this come into play when the nations "hear about what the LORD did to Egypt" and are fearful as a result. In the NT, which interprets events spiritually, Pharaoh becomes symbolic of Satan, and Egypt is symbolic of the demonic world order that rules all those in sin and binds all sinful men in spiritual bondage. All of this will be exposited in detail as the relevant passages come up. For now, the passages speak for themselves: this story is a contest of strength between Pharaoh and God, with Pharaoh constantly challenging God's authority and God constantly demonstrating his strength through the forceful power of miracles to successively destroy Egypt.
Here, Pharaoh challenges the identity of the LORD: "Who is the LORD that I should obey his voice...? I do not know the LORD..." Interestingly, it was precisely the identity of the LORD that God was establishing with Moses in chapter 3, so while I called that chapter The Education of Moses, we can consider what happens after this to be The Education of Pharaoh (... and yet more Education of Moses too, because as we see, Moses still has a lot to learn in his own right).