The Golden Calf was an idol built by Aaron for the Hebrew Israelites after they had left Egypt and formed their own independent nation. The Golden Calf followed after the patterns and pantheon of Egypt, because it was not the worship of the true God, but worship of false gods manifested in an animal-shaped idol. It was built by Aaron by the request of the Israelite community after their leader, Moses had not returned from a prolonged communication with God on Mount Horeb.
The want for "god"
Shortly after Israel had become an independent nation, they settled near Mount Horeb- just as God had predicted several months prior. During this time Moses went up onto the mountain where he received the first parts of the law, which would eventually become part of the Book of Exodus and the Pentateuch. While Moses was convening with the LORD, his brother Aaron lead the nation. Moses remained upon the mountain for nearly forty days and night.
When the Israelites saw Moses visit was prolonged they began to believe that the true God, Yahweh, had not really delivered them out of Egypt; fearing Moses had disappeared. They went to Aaron, asking for replacement "gods" so that they would be protectors.
Aaron obliged and asked all the Israelites to give their golden earrings they had obtained from Goshen after the Passover. Once Aaron had all the earrings he melt them and cast them into the shape of a calf. This would have resembled the Egyptian pantheon the Israelites were exposed to as slaves.