Human beings live, after their deaths, in an intermediate state, a realm called "Barzakh" (the Intermediate World) which is a world between this life and the Hereafter. Barzakh is a sequence that happens after death and which continues until the arrival of the Day of Judgment when human beings shall be held accountable for their deeds." The intermediate world which is like a realm of sleep is not material but it has some of the concomitants of the matter such as form, time and place.
Depending on the type of their deeds in the world, human beings will live somehow in specific places in the intermediate realm. Others' good deeds and charity on behalf of the deceased will benefit him in the intermediate world and on the Day of Resurrection. There are traditions and rational arguments in this regard which shall be mentioned in the detailed answer.
Your question is made up of several questions about man's life in the afterworld. For this reason, it is necessary to sort out the different parts of the question in the first place and then it would be easier to give an appropriate response to it:
First: Where do human beings live after their deaths until the Day of Judgment?
Second: What are the characteristics and features of the place where human beings live in the period between this world and the Day of Judgment? Is it a realm timeless and placeless?
Third: Do human beings live in one and the same place, or do they have different positions and places depending on the degree of their faith?
Fourth: Do the good deeds and works of charity done by the heirs benefit the deceased people and elevate their ranks in the Hereafter?
First: Barzakh, an Intermediate State between This World and the Hereafter
Rational arguments, the Quranic verses and prophetic traditions clearly indicate that man is not perished with death. In fact, man's spirit which is an independent entity constitutes his identity. The Quran ascribes accidents and flaws to the body only not to the spirit. The interesting thing is that in the Holy Qur'an "dying" is mentioned fourteen times with the word tawaffa which means "entrusting". That is to say after death one will not be perished but that Allah will take His thing back without increase or decrease and Who will entrust it to His appointed workers.  There are also other proofs in this regard in the Quran and traditions of which one is the Holy Prophet's address to the people of the graves. 
As for the question about the situation of the spirit after death, it is also a question whose answer should be found from the Quranic verses as well as traditions. In this regard the Holy Quran says: "And behind them is a barrier [partition] until the day [of resurrection] when they are raised."  The Intermediate World refers to the realm of grave; it is a realm in which man lives a special kind of life until the Day of Resurrection. This fact is affirmed by many verses of the Holy Quran as well as traditions which have been narrated through both Shia and Sunni sources. 
The literal meaning of Barzakh is obstruction or barrier intervening between two things. However in Islamic eschatology, Barzakh is the intermediate state between this world and the Hereafter. It is very different from the material world. The existents in the intermediate realm are not material, yet they have some features which are characteristic of matter  such as forms, time and place. Thus, they can perceive different conditions like hardship, tranquility, happiness and sadness etc.
It is very important to note that when it is said that the intermediate world is devoid of matter, we should not think that the pleasures of the intermediate realm is imaginary and unreal or visionary because it has some of the material concomitants, though it is not material by itself. 
In order to understand this point more clearly, it would be beneficial to note that man is a composite of two bodies: 1. The ideal (mithali) or light body; 2. The weighty body. The weighty body is the very body which we have now and which needs food, clothing, care etc. The light body (corpus) is the body we have in the realm of sleep with which we travel sometimes for hundreds of kilometers in an instant. It is for the same reason that it is also called "the light body". That is because if we were supposed to tread a long distance in the state of wakefulness, it would take us many hours and require us to use a lot of energy. We will live with this light body in the intermediate world until the Day of Judgment when the scattered particles of human body would be gathered together and resurrected in the form of a weighty body. 
Although the ideal body is not weighty, it can perceive various conditions in the same way as it feels things with their external appearance in the state of sleep. In the intermediate world, our body possesses the same characteristics as it does in the state of sleep in this world. According to some traditions, man lives in the intermediate world with the form and skeleton like those of the worldly form and worldly skeleton. 
Finally, it is important to note two points in this regard:
1. The intermediate world is much bigger and wider than this world because the ideal world is more extensive and bigger than the material world; the former does not have limitations and constraints of the latter.
2. According to many traditions, the earth has been appointed as a place for punishment or rewards of the intermediate world and for meeting of the spirits with their families. For example, it has been reported in some traditions that the Paradise of Barzakh is Wadi al-Salam and its fire is the Barahut Valley whereas the Beit al-Moqaddas Rock is the place of the congregation of the spirits. Definitely, these traditions imply that the material relation of the spirits with the world is not severed completely. These possible incidents indicate the fact that the spirits are into some communications with the world because of the excellence of the place or time or situation. 
Second: Characteristics of the Intermediate Life
As we mentioned above, Barzakh is an intervening stage between this world and the Hereafter. It is considered to be a realm between the material and the abstract realm. In philosophical terms, this world is called the ideal (mithali) world. Therefore, the existents of the intermediate realm are not material but they do feature some of the material concomitants because they are not completely devoid of matter.  Therefore, Barzakh is not timeless and placeless; rather, it is possible that time may elapse very faster than it does in this world. Similarly, the "place" in the intermediate realm may also be characterized by less limitations as compared to this world. This point can be substantiated through the verses of the Quran also. It says:
"On the Day that the Hour (of Reckoning) will be established, the transgressors will swear that they tarried not but an hour." 
This verse clearly states that people live a short period of time in this place, the intermediate realm.  It can be inferred from this verse and other similar verses that there are time and place in Barzakh but with less constraints. The intermediate world is, for the good doers, a kind of emancipation from the material world which to them looks like a cage but it is very horrible and fearsome for the sinners. Depending on the deeds which a person may have done in this world, he lives there either in agony or in comfort. 
When it comes to the nature of Bazakh, there are different interpretations in our traditions. A few examples can be read below. Imam Ali (a.s) said in a letter to his son:
"Be mindful that a grave is either a garden from the gardens of Paradise or a pit from among the pit-holes of Hell Fire." 
It is deduced from the above verse that bounties in Barzakh are paradigms or instances of the bounties given in the hereafter and its punishments are also instances of the punishments in the afterworld. 
It has been stated in some traditions that a heavenly position is shown to a believer in the hereafter. So he is made happy. 
Third: Conditions of the People of Barzakh
The people of Barzakh live either in agony or in comfort in the same way as the people of this world are tormented by a nightmare or become happy when they see a happy dream. Some deeds like taking prayer lightly or not helping the oppressed etc. entail punishments for a person in Barzakh. Likewise, some other actions like martyrdom in the way of God, religious propagation and giving religious awareness bring about comfort and happiness in the intermediate world. 
The Holy Prophet (peace be upon him and his holy family) is reported to have said that the squeezing of the grave is the expiation of the sin of wasting and not appreciating the bounties granted by God.  Some of the other reasons for this punishment include laziness in purifying oneself after urinating, creating mischief amongst the people, backbiting, bad behavior towards one's family members, and making false allegations.
The people of Barzakh are divided into three groups each dwelling in a particular place: 1. The true perfect believers; 2. The confirmed unbelievers; 3. Mustaz'afeen or those who are neither perfect believers nor confirmed unbelievers. 
In another traditions narrated from Imam Sadiq (a.s), he has been quoted as having said: "The spirits of the believers are lodged in Paradise and the spirits of the unbelievers are lodged in Hell Fire." 
It has also been reported from the Imam that the spirits of Mustaz'afeen (the third group) are stored in their graves where the sweet fragrance of Paradise reach them. 
Of course, it has been said in other traditions also that the spirits of believers go to Wadi al-Salam  or they go on the night of Friday to a rock in Beit al-Moqaddas.  These traditions are not contradicting the previous tradition because it is possible that all of these may happen to be at one place or it is possible that the spirits of the believers may sometimes be at one place and other times at another place.  The spirits of the unbelievers are also, as mentioned in narrations, in rooms of fire or at a place named " Hadramout " in Yemen or at Barahut Valley. 
As for the spirits of the Mustaz'afeen, they remain in the grave until the Day of Judgment and if they have done any good deeds, a window will be opened in their grave to Paradise and they will benefit from it. 
Based on the above, it can be said that the conditions of the spirits depends on their degrees and ranks after death. One who is strongly attached to this world, it will take him a long time to believe death and forget the world and its attractions. And he who is from the middle group, goes to a deep sleep never seeing any dream to be either tormented or pleased with it. He will not have any special feeling of the intermediate life. As for the perfect believers, since they have strengthened their spirits and prepared themselves for the hereafter, they can also establish relations with the spirits of other believers in that abode. Thus, they can get news of their friends and ask after their health in the material world. They become happy when they see that their friends are in good health. They pray for those who live in the world. Therefore, only those who are perfect believers can have the opportunity to meet other believers and ask after their health.
Imam Sadiq (a.s) says: When a human being enters the grave and Barzakh, the people of Barzakh rush to see him. They console him for a while until he comes to his senses because he has just passed the horrors, the tiring moments of the grave, its questioning and squeezing etc. Then they approach him and ask him about the lives and conditions of the friends. If he says that they are still in the world, they become hopeful that they might see him later. And if he says that they had died long time ago, they will say "He has fallen." That is to say, he is suffering from divine punishment, otherwise he would have been brought to us." 
It has been narrated from Ishaq bin Ammar in Al-Kafi that he said, "I asked Imam Kazem (a.s) whether a dead person would meet his family. Imam Kazem replied: "Yes." Then I asked: "How often does he meet them?" Imam Kazem replied: "Depending on his divine position, he may meet them once every week, once every month or once every year..." 
Above these group of people, there are the divine saints whose spirits become stronger after death and after shaking off the material body. Their activities increase because the worldly obstructions like Taqiyah (practicing the faith in concealment), suffocation and the likes are no longer there. This group of people comes to the death bed of dying people making their deaths easier. They become their friends in the grave and deliver them from loneliness and horror. Then after preliminary procedures, he is taken to his friends to join them. For this reason, this group of people does not need to be informed by other spirits about people living on earth because they have full knowledge of the world and the intermediate realm. They are not negligent of the conditions of the believers especially those who are in communication with them, serve them and seek means of nearness through them. 
Fourth: The Heirs' Charity and Good Deeds
What is inferred from the Quranic verses and traditions is that man does not have access to any means after death, yet if he has done good deeds in the world, he will be, after his death, benefited by those deeds. Imam Jafar Sadiq (AS) says that: "Three things help a man after his death, and these are: a continuous charity given by him, a good habit he taught to others and a good offspring he leaves behind, who prays for his forgiveness." 
The good deeds which the heirs do for the deceased ones are also have the same effect; it is considered to be a kind of Baqiyat al-Salihat (deeds of righteousness). For example, one of the Infallible Imams was asked: Are dua, Sadaqa and prayer for the deceased useful to them? He said: "Yes." 
There are similar traditions in Shia sources according to which the benefit of charity and good deeds for the dead is their comfort in the intermediate world and resultantly on the Day of Judgment. 
In other words, a sinner's good deeds, will wipe out, as per the Quranic verses, the sinner's sins and their effects. In the same way, if others do good deeds and dedicate their rewards to the spirit of a sinner, this action will cause his sins and their effects to be wiped out.
Certainly, if the rewards for the good deeds done by others and dedicated to the sinner are to the extent that they can make up for his sins, then there is no doubt that his sins will be compensated by those good deeds. Basically, it is in accord with God's justice to replace the bad deeds of a sinner with others' good deeds, if they dedicate the rewards of their good deeds to him and if the rewards are to a pretty good deal. That is because God the Almighty has left this way open to the sinner, as per the saying of His Messenger (s).  In this world also, if someone commits an offence and inflicts a loss upon another person and if a third person compensates the loss on the offender's behalf, definitely the person who suffered the loss will agree to accept the compensation and forgive the offender. If he does not accept the compensation, he will be reproached in common view. Therefore, one should not wonder or question as to how the sin of a sinner who has died is wiped out with the charity and good deeds done by the survivors.
Indeed, if an individual has committed so many great sins that if all the good doers dedicate the rewards of their good deeds to him, they cannot compensate his great and numerous sins, in this case, his sins will never be forgiven by others' good deeds. In fact, God will reduce the effect of his sin and subject him to lesser punishment.
One should not be negligent of the fact that generally the sincere prayers for the expiation of the sins of a person is because of the good deeds which he has done in his life, otherwise if he does not have a single positive point in his life and his entire life had been full of sins, no one will pray honestly and sincerely for him. Even his children and close relatives will not pray honestly for him what to speak of others. If his relatives are sinners themselves, their prayers and supplications will not be fulfilled. And if they are good people, they do not have any happy memory from him so that they might pray persistently and honestly for the expiation of his sins. 
Hence, we can say that these deeds are in fact the results of the faithful and good life of that person with the only difference that they (results) appear a little after his death.
For further information in this regard, kindly refer to:
1. The Spirit's Knowledge after Death, question 6773, (site: 6851)
2. Death and Knowledge after It, question 170 (site: 1245).
 - "Say: The angel of death who is given charge of you shall cause you to die, then to your Lord you shall be brought back." [As-Sajdah, 11]
 - Behar al-Anwar, vol.6, pg. 169.
 - Al-Mumenoon, 100
 - Tabatabai, Muhammad Hussein, Tafsir al-Mizan, translation, Muhammad Baqir Musavi Hamedani, vol.15, pg. 97, Islamic Publications Office.
 - Tabatabai, Muhammad Hussein, Mankind from the Beginning until the End, translated and annotated by Sadiq Larijani, pg. 77- 78, Al-Zahra Publications.
 - Qasimi, Ali Mhammad, Bazakh, A Quranic and Narrative Research, pg. 16, Imam Khomeini Educational and Research Institute Publications Center, 1st edition.
 - Qira'ati, Mohsen, Roots of Religion, pg.584.
 - Allamah Majlisi, Behar al-Anwar, vol.6, pg. 244 – 345, Dar al-Kutub al-Islamiyah, Tehran, 1362 (1983).
 - The Life after Death, pg.48
 - Tabatabai, Muhammad Hussein, Mankind from the Beginning until the End, translated and annotated by Sadiq Larijani, pg. 77- 78, Al-Zahra Publications.
 - Room, 55.
 - Tafsir al-Mizan, translation, Sayyid Muhammad Baqir Hamedani, vol.16, pg. 308.
 - Roots of Religion, pg. 582.
 - Behar al-Anwar, vol.6, pg. 218.
 - Mankind from the Beginning until the End, pg. 79
 - Behar al-Anwar, vol.6, pg. 237
 - For further information about the sins which entail punishments and the good deeds which entail reward for the doer in the intermediate world, vide: Qira'ati, Mohsen, Roots of Religion, pg. 590 – 596.
 - Behar al-Anwar, vol.6, pg. 169
 - The word Mustaz'afeen refers to those who at times tried to understand and act but they did not have the intellectual capacity, such as the made and insane people. See: Mazaheri, Muhammad, Man and the Intermediate World, pg. 58 – 64, Nabawi Publications Institute.
 - Behar al-Anwar, vol.6, pg. 234.
 - Kulayni, Al-Kafi, vol.3, pg. 246.
 - Ibid, vol.3, pg. 243
 - Behar al-Anwar, vol.6, pg. 286.
 - Man and the Intermediate World, pg. 55, Nabawi Publications Institute, Tehran, 1375 (1996).
 - Kulayni, Al-Kafi, vol.3, pg. 246
 - ibid
 - Behar al-Anwar, vol.6, pg. 249 – 250, 269.
 - Ibid, vol.6, pg. 257
 - Excerpted from answer No.1245 on our website
 - Man and the Intermediate World, pg. 1430
 - Ibid, vol.88, pg. 310.
 - Man and the Intermediate World, pg. 143.
 - Vide: Mizan al-Hikmah, under letter "T" , the subject of "Tawbah".
 - Extracted from answer 2448 on our website.