Martin Luther, like most traditional Christians, believed that this life was simply a pilgrimage, a journey toward our final destination. That destination was an eternity spent either in heaven or in hell. There was nothing one could do to earn a spot in heaven-God freely forgave the sins of some, and they could enter heaven. Heaven is a state of blessedness where you exist in the presence of God, something humans have not been able to do since the fall in the Garden of Eden. Hell was a place of torment, as just punishment for sin.
Luther disagreed strongly with the Roman Catholic teaching that there is also a place called purgatory, because purgatory is not explicitly mentioned in the Bible. The belief in purgatory developed over the course of the Middle Ages, driven by the logic of the Catholic system of sanctification. Those who were baptized and thus cleansed of the stain of original sin still had to pay the debt for the offense of sin to a perfect God. (In addition, any additional sins must be paid for.) You earned merits toward the debt by performing works, especially the sacraments. Since no work of a finite fallen being on its own would count for much, only works performed within the structure of God's grace mediated by the church counted. Very few people led a life sufficiently sinless and with enough good works to be out of debt when they died. Those who did were saints. Those who had made sufficient but not complete progress on the path of sanctification were sent at death to purgatory, which was exactly like hell (full of torment) to burn away or purge the remaining sin. The difference between purgatory and hell is that there is an end point to purgatory: when your sins are purged you may enter heaven. Luther argued instead that all were sinners, always. Saints were all Christians whose sins had been forgiven and who had received that forgiveness, and had therefore been justified, through faith. At death they slept peacefully until the final resurrection of the dead when they entered heaven. (John Calvin opposed this argument, insisting instead that the dead souls of the saved rested in a blessed state until they were resurrected.)
In the past, the major split in Christianity on the afterlife was between Lutherans and Calvinists on the one hand, who argued that humans played no role in their own salvation, and Catholics and Methodists who argued that free will and works played a role. In more recent years the more significant split has been between the more conservative and more liberal wings of each Protestant denomination.
The conservative wing of the Lutheran Church maintains its belief in an afterlife spent in a literal place, either heaven or hell. More liberal Lutherans tend to downplay hell, often because the image of God torturing people for eternity, even if they are sinners, is not easy to square with their idea of a loving God. Nor is it easy to square the idea of a just God with one who casts people into hell just because, as the result of fortune for which they are not responsible, they have not lived in a place where the Gospel of Jesus was preached.
Far more Americans say that they believe in heaven in recent surveys, than say they believe in hell. There are also Lutherans since the mid-20th century (this is true of all Protestant denominations) who hold that neither heaven nor hell are literal places. If the core of salvation as described above is to live in the presence of God, heaven is then a metaphor for blessedness or a divine relationship in this life. Hell is a metaphor for living in the absence of God in this life.