Is there a halacha that says a Jew must get married? How serious is it? What if a Jew is not married and remains a bachelor all their life, having sex?
Please support your answers from Tanach and Talmud.
The Mitzvah of Pru Urevu applies to every Jewish man. Of course this is in the Torah. Also, the discussion in the gemarah and elsewhere involves whether or not one must have a boy and a girl or is able to fulfill the mitzvah with two girls or two boys.
for example The First Mitzvah: Peru Urvu
The Mishnah records a dispute concerning the basic parameters of the mitzvah to have children: “A person may not neglect procreation unless he has children. Beis Shamai say: two males; Beis Hillel say: one male and one female, as it says (Bereishis 5): He created them male and female.”
Several contemporary halachic issues are related to the mitzvah of procreation, including such delicate topics as fertility treatments (and the question of fatherhood), surrogacy, contraception, and the general obligation to get married. We will leave these important discussions for a future opportunity.
Given the mitzvah to have children, the mitzvah to marry follows since "Kedoshim Tihyu". One must be and act in a holy manner. Thus, having children outside of marriage would be forbidden. However, one could have children with a pilegesh (concubine). The talmud also points out that in normal circumstances, a person would not perform "beilas znus" and that relations between a man and a woman would be "biah al mnas lekadeish"
Additionally, as it says at Is Marriage A Mitzvah?
RASHI explains that the Mitzvah which one fulfills by getting married is the Mitzvah of Piryah v’Rivyah, having children. Other than the Mitzvah of Piryah v’Rivyah, there is no inherent Mitzvah in the act of getting married. This explains why the Gemara mentions that the case of the Mishnah is not only where one already has a wife, but he already has children as well.
The RAMBAM (Hilchos Ishus 1:2) writes that marriage is a Mitzvas Aseh [positive commandment]. The Rambam apparently maintains that every time a man marries a woman he fulfills a Mitzvah. How does the Rambam understand the Gemara here [Beitzah 36b] which says that one who is already married and has children does not fulfill a Mitzvah by getting married?
Apparently, since it is uncommon for a woman to agree to become a man’s Pilegesh (since she has no guarantee that the man will take care of her and her children, as she receives no Kesuvah and there is no Kidushin), the Gemara considers Kidushin a Mitzvah because in practice one is unlikely to fulfill Piryah v’Rivyah by taking a Pilegesh. He has no choice but to get married with Kidushin.
Alternatively, perhaps the Rambam does not mean that it is a Mitzvas Aseh per se to marry a wife with Kidushin. Rather, he means that it is an Isur Aseh (a prohibition that results from a positive commandment) to take a woman without Kidushin. (The Rambam rules that taking a Pilegesh is prohibited; see Hilchos Melachim 4:4.)
According to this then, the mitzva of pru u'rvu requires kiddushin (and nisuin) in order to be fulfilled properly.