Briefly...
Briefly, Imam Mehdi(as) is the son of the 11th Imam, Hazrat Hasan al - Askari and Bibi Nargis. He is our 12th and the last Imam. He was born on 15th Shaban 255 AH / 869 AD in Samarra, Iraq. He lived under his father 's care until 260AH / 874 AD. As a normal trend of Imamat, just after the martyrdom of his father, Imam Hasan al - Askari (as), he became the Imam in 260 AH. He then by the Allah's Command went into occultation (ghaybah) immediately.
The occultation (period of ghaibat) of Imam Mehdi (as) is divided into two par ts. 1 - The minor occultation ( ghaibatu'l-sughra ), which occurred from 260 AH / 872 AD to 329 AH /939 AD, lasting 70 years. 2 - The major occultation ( ghaibatu' l- kubra ), which occurred from 329 AH / 939 AD and is still in process. No one, except Allah (swt), knows the length of the major occultation. Even the Imam himself does not know about the time when his occultation will be over.
No one, except Allah (swt), knows the exact place of Imam's residence. However, there are some reliable narration and reasonably trustworthy clues to form a hypothetical opinion about his station. Philosophy of the occultation It is important to do extensive research on the hadiths to know correctly about the purpose of occultation, and the way Imam Mehdi (as) would re- appear.
It is not as simple as we think that our Imam is just living somewhere in hiding, does hajj ever y year, helps people or Ulema and will reappear on any Friday to establish an unparalleled Islamic government after killing all the Kafirs by his sword. There are some important questions concerning the occultation of the Imam which need rational explanation. 1 - What is the Divine scheme and purpose of keeping the Imam alive but totally invisible to the public?
2 - What is the daily routine of the Holy Imam ? Is he just helping the Ulema occasionally, passively observing the daily performance of the Shias, attending and helping the people in their desperate need and that's all ? What would be the productive turnout of his hundreds of years stay in occultation ? 3 - How will the Holy Imam, on his arrival just as one single person, destroy the giant nuclear powers of the time by a conventional weapon - the sword ? eg.
China alone has about 2 million troops on active duty, 600,000 people in reserve and about 1 million in its armed militia uses as a military draft.