The first text in the canon that we use to understand that married women cover their hair is BaMidbar 5:18.
וְהֶעֱמִיד הַכֹּהֵן אֶת-הָאִשָּׁה, לִפְנֵי יְהוָה, וּפָרַע אֶת-רֹאשׁ הָאִשָּׁה, וְנָתַן עַל-כַּפֶּיהָ אֵת מִנְחַת הַזִּכָּרוֹן מִנְחַת קְנָאֹת הִוא; וּבְיַד
.הַכֹּהֵן יִהְיוּ, מֵי הַמָּרִים הַמְאָרְרִים
And the priest will stand the woman before God, and he will [wait on this one] the head of the woman, and put on her hands the memorial meal offering, which is a meal offering of jealousy, and in the hand of the priest will be the bitter waters that induce the spell. (Based on NJPS translation)
The key term is וּפָרַע, which can mean either to uncover or to unbraid. (The Targumim, the Aramaic translations of the Tanakh, are similarly ambiguous. Perhaps at some point I will bring those texts as well- right now I'm just remembering the conclusions that I came to in a paper I worked on in college, focused on precisely this passage, and its Aramaic translations.)
Since we describe the woman's head being uncovered/unbraided, Jewish tradition presumes that her hair was covered before this point, logically enough, and deduces that covering is the appropriate manner of dress for women- particularly for married women, since that is who is mentioned in the verse.
The Torah says nothing else (that I know about) about head-covering for women, and is pretty silent on the topic of men's head-covering.