There are two sources in the Torah that can serve as instructions for the idea of circumcision, and a few other important references to the idea that circumcision is an integral component of the definition of Jewish peoplehood.
The first time the subject of circumcision is raised is in Bereshit (Genesis) Chapter 17, in the context of the BRIT - Covenant - forged between Abraham and God.
17:4-8 'As far as I am concerned, here is My covenant with you: You shall be the father of a horde of nations. No longer shall you be called Abram. Your name shall become Abraham, for I have set you up as the father of a horde of nations. I will increase your numbers very, very much, and I will make you into nations - kings will be your descendants. I will sustain My covenant between Me and between you and your descendants after you throughout their generations, an eternal covenant; I will be a God to you and to your offspring after you. To you and your offspring I will give the land where you are now living as a foreigner. The whole land of Canaan shall be [your] eternal heritage, and I will be a God to [your descendants].'
What God asked for in return is for the males of Abraham's household to be circumcised. This is what we refer to as the "mark of the covenant." This is followed up by 17:14, which states: "The uncircumcised male whose foreskin has not been circumcised, shall have his soul cut off from his people; he has broken My covenant." This is a sentiment that is taken seriously by most Jews today.
The next time circumcision comes up is when Yitzchak (Isaac) is born, in chapter 21, verse 4.
"When his son Isaac was eight days old, Abraham circumcised him, as God had commanded."
The next three times circumcision comes up in the Torah is a. in the context of the sons of Yaakov (Jacob) convincing the Shechemites of the only way they could intermarry with one another, b. when Zipporah circumcises her son, and c. in the context of participating in the Paschal lamb before leaving Egypt.
The first of those two examples is certainly a controversial story, the subject of a much longer discussion. But here is the quote from Bereshit 34:13-17:
When Jacob's sons replied to Shechem and his father Chamor, it was with an ulterior motive. After all, they were speaking to the one who had defiled their sister Dinah. 'We can't do that,' they said. 'Giving our sister to an uncircumcised man would be a disgrace to us. The only way we can possibly agree is if you will be like us and circumcise every male. Only then will we give you our daughters and take your daughters for ourselves. We will be able to live together with you and [both of us] will become a single nation. But if you do not accept our terms and agree to be circumcised, we will take our daughter and go.'
The young man in question immediately circumcises himself, and his people follow his lead. The rest of the story... well, you'll just have to do your own homework on it.
Zipporah circumcising her son is the subject of a very long discussion, but see this interesting interpretation of that tale over here. And a slightly longer analysis (though wholly incomplete) over here.
In terms of preparing for the Paschal Lamb, we have the book of Shemot (Exodus), Chapter 12
12:43-49 God said to Moses and Aaron, 'This is the law of the Passover sacrifice: 'No outsider may eat it. If a man buys a slave for cash and circumcises him, then [the slave] can eat it. ]But if a gentile is] a temporary resident or a hired hand, he may not eat [the Passover sacrifice]. 'It must be eaten by a single group. Do not bring any of its meat out of the group. Do not break any of its bones. 'The entire community of Israel must keep [this ritual]. When a proselyte joins you and wants to offer the Passover sacrifice to God, every male [in his household] must be circumcised. He may then join in the observance, and be like a native-born [Israelite]. But no uncircumcised man may eat [the sacrifice]. The same law shall apply both for the native-born [Israelite] and for the proselyte who joins you.'
The next significant commandment of circumcision is in the book of Vayikra (Leviticus) 12:3
12:1-3 God spoke to Moses, telling him to speak to the Israelites, relating the following: When a woman conceives and gives birth to a boy, she shall be ritually unclean for seven days, just as she is unclean during the time of separation when she has her period. On the eighth day, [the child's] foreskin shall be circumcised.
As I have noted here, we circumcise because we are commanded by God through Moshe (Moses) to do so - in this Leviticus source. We follow the family tradition of Avraham as noted in the first source above.
Everything else is commentary and explanation. Go out and learn all about it!