The Talmud addresses both these questions in its analysis of Ezekiel 37.
According to R. Judah in the Talmud, people were really resurrected as a metaphorical act foreshadowing upcoming events.
Whether or not to take these opinions in the Talmud literally, is an entirely different question.
The Sages of the Talmud assume that there will be a resurrection for the righteous in messianic times. In Sanhedrin 90a the Rabbis declare that any person who claims "the resurrection is not a biblical doctrine" has no share in the world to come. Immediately following, the Talmud seems to reject this assumption and suggest that such a person would actually have a share in the world to come and only wouldn't merit to be resurrected, then the Sages try to find a mere hint in the Bible for resurrection...here it gets tricky.
The whole discussion in Sanhedrin is really fascinating and rich with beautiful metaphors and creative forms of biblical exegesis. Just in case you're interested, below are some of the arguments and counter arguments provided (all found in chapter 11 of Tractate Sanhedrin - Soncino translation):
[It reads, Num. xviii. 28]: "And ye shall give thereof the
heave-offering of the Lord to Aaron the priest." Should, then, Aaron
remain alive forever? He did not even enter into the land of Israel.
How, then, could Israel give him heave-offering? Infer from this that
he would experience resurrection and Israel would give him
heave-offering. Hence here is a hint of resurrection.
R. Sinai said: [Ex. vi. 4]: "And as I did also establish my covenant
with them, to give unto them the land of Canaan." It does not read "to
you" (as it should, the patriarchs of that time being already dead),
but "to them"--hence this is a hint that they would be restored.
Rabban Gamaliel: [Deut. xxxi. 16]: "Thou shalt sleep with thy parents
've-qom,'" "and arise. Rejection: Perhaps this word ve-qom is
connected with its succeeding words. [The translation of this verse
by the translator of the Bible according to the sense does not
correspond. The reason, however, of the Talmud's opinion is because it
should read, "Sleep with thy father, and the people will go astray."
Hence the word "arise" is superfluous. Furthermore, as it reads, "and
arise," it is therefore enumerated among the five verses of which the
explanation was doubtful to the most famous Tanaim of the Talmud.
These verses are: Gen. iv. 7: The word "sheath," which has two
meanings, "atone" and "carry" (the sin)--whether it belongs to its
preceding words and the former is the meaning, or to its succeeding
words and the latter is the meaning; Ex. xxv. 34: the word
"almond-shaped"--whether it belongs to the candlestick or to its
succeeding words; ibid. xvii. 9: whether the word "to-morrow,"
mentioned in this verse, belongs to preceding or succeeding words;
Gen. xlix. 7: whether the word "cursed" ends verse 6 (at that time the
verses were not as yet marked) or it is the beginning of verse 7
(explained elsewhere); and the verse in question cited, whether the
word "ve-qom" belongs to the preceding or succeeding words. This was
said by Issi b. Jehudah, the greatest authority among the ancient
Tanaim, to whom even the word Rabban was not added, as to Hillel and
Shammai. (See Passover, 236, explaining who Issi b. Jehudah was.) And
after him no lesser authorities than Rabban Gamaliel and R. Jehoshua
b. Chananjah interpreted this verse on the assumption that the word
"ve-qom" belongs to its preceding words. Hence, in accordance with our
method, we could not omit this strange supposition.]
[Is. xxvi. 19]: "Thy dead shall live, my dead bodies shall arise.
Awake and sing, ye that dwell in the dust; for a dew on herbs is thy
dew, and the earth shall cast out the departed." Rejection: Perhaps
the verse cited means those dead who were restored by Ezekiel [chap.
Xxxvi.]. [Solomon's Song, vii. 10]: "And thy palate like the best
wine, that glided down for my friend gently, exciting the lips of
those that are asleep." Rejection: This cannot be taken as an
evidence, for it is not certain that "are asleep" means the dead.
R. Eliezer b. Jose said: [Num. xv. 31]: "That person shall be cut off,
his iniquity is upon him"? Upon him--when? Does it not mean after he
shall be cut off? Hence it means even in the world to come.
Rejection: They may explain it as in the following Boraitha: Lest one
say that he will be cut off even after his repentance, therefore "the
iniquity is upon him" means only when it is still upon him, but if he
repented it is no more upon him.
Queen Cleopatra: [Ps. lxxii. 16]: "And (men) shall blossom out of the
city like herbs of the earth."
Daughter of Caesar: If there were two potters in our city, of whom one
should make a pot from water and the other from clay, to which of them
would you give preference? And he said: Certainly to him who creates
from water; for if he is able to create from water, he is undoubtedly
able to create from clay.
The school of R. Ismael: One may learn it from glass-wares, which are
made by human beings, and if they break there is a remedy for them, as
they can be renewed: human beings, who are created by the spirit of
the Lord, so much the more shall they be renewed (restored).
There was a Min who said to R. Ami: You say that the dead will be
restored. Does not the corpse become dust? How, then, can dust be
restored? And he told him: I will give you a parable showing to what
this thing is similar. A human king said to his servants: Go and build
me a palace in such a place, where there is no earth and no water. And
they did so: and after it collapsed he commanded the same to build it
for him in a place where there was earth and water. And they answered:
We cannot do so. And he became angry, saying: When you could build it
in such a place where there was no earth and no water, ought you not
to be able to build it where they are? And if you don't believe it, go
into a valley and see a mouse, which is half flesh and half earth (it
being believed that there is a species of mice developed from earth),
and to-morrow it multiplies and becomes all flesh. And should you say
that it takes much time till it becomes so, go up into the mountain,
and see that to-day you cannot find even one helzun, and on the
morrow, after rain, you will find the mountains full of them.
Gebiah b. Psisa: That which has not existed at all comes to
life--shall those who had life once not come to life again?
Rabha [Deut. xxxii. 39]: "I make one die and I make one alive"; and
further on it reads: "I wound and I heal"? It means that the Holy One,
blessed be He, says: All that I made to die shall I bring to life
again, and thereafter shall I cure what was wounded. The rabbis
taught: Lest one say that the verse just cited means, I make one die
and another one shall I bring to life, therefore it reads, "I wound
and I cure." As wounding and curing apply to one person only, the same
is the case with death and life--they apply to one person. R. Mair
[Ex. xv. 1]: "Then Moses and the children of Israel will sing this
song." It does not read "sang," but will sing (yoshir). This is a hint
of resurrection in the Torah. Similar to this is [Joshua, viii. 30]:
"Then Joshua will build an altar." It does not read "did build," but
"will build." Rejection: This is also a hint of resurrection. (Says
the Gemara): However, this cannot be taken as a support, as the same
expression is to be found in I. Kings xi. 7, and nevertheless it does
not mean in the future, but in the past.
R. Jeoshuah b. Levi [Ps. lxxxiv. 5]: "Happy are they who dwell in thy
house: they will be continually praising thee." It does not read
"praised thee" in the past, but in the future. Hyya b. Abah in the
name of R. Johanan [Is. lii. 8]: "The voice of thy watchmen--they
raise their voice, together shall they sing; for eye to eye shall they
see, when the Lord returneth unto Zion." It does not read "sung," in
the past, but in the future. Rabha said [Deut. xxxiii. 6]: "May
Reüben live, and not die"--which means that he may live in this world,
and not die in the world to come. Rabhina [Dan. xii. 2]: "And many of
those that sleep in the dust of the earth shall awake, some to
everlasting life, and some to disgrace and everlasting abhorrence."
R. Ashi [ibid., ibid. 13]: "But thou, go (thy way) toward the end; and
thou shalt rest, and arise for thy lot at the end of the days." R.
Tabi in the name of R. Joshiah said: It reads [Prov. xxx. 16]: "The
nether world, and a barren womb; the earth which is not satisfied with
water; and the fire which never saith, Enough." What correspondence is
there between the nether world and the womb? This is only to say that
as the nature of the womb is, if something be brought in, to give it
out, the same is the case with the nether world--it gives out what is
brought in. And it is to be inferred by an a fortiori conclusion thus:
If the womb, which receives in silence, yet brings forth amid great
cries [of jubilation]; then the grave, which receives the dead amid
cries [of grief], will much more so bring them forth amid great cries
[of joy]!