The twelfth house is the 12th from ascendant when counted anti-clockwise. If the master of 12th house is present in exaltation or in own house, specially if in center (1,4,7,10) or in trine (1,5,9), it will give native good results. The 7th house is also called the Vyaya Sthan (the house of losses/expenditures). It corresponds to the native's inner self, ordeals underwent his whole life through, hidden enemies, and serious illnesses. It is related to places of confinement such as hospitals, prisons, convents, etc., and also includes solitude and major inner crises.
The master of 12th must not be present in ascendant or 11th house, otherwise, the native suffers with deep losses in life, specially related to finances. If Jupiter is present in 12th house, the native will spend money in spiritual activities.
The 12th house mostly signifies the following:
1. Losses in general.
3. Paternal uncles
4. Detachment, surrender, renouncing
5. Waste and expenditures
6. Secrets, secret enemies, involvement in scandals, disgrace and sorrows
7. Success through occult activities
8. Feet, left eye, disturbed sleep, mental imbalance, physical imbalance, hospitalization, crippled limbs, death
9. One's own bedroom, foreign lands, exile, confinement
10. Incarceration (formation of Karawas yog in 12th by combination of Saturn + Ketu).
11. Past life and the path of one's soul
During the dasa, antardasa of the Lord of 12th house, you will see the above significations of 12th house, taking prominence in your life.
It is suggested that one must get married to someone who has most/major planets in one's 12th house. In that case your partner will be able to understand your hidden desires more easily. E.g. If someone is born with Virgo ascendant, he will have Leo as 12th house. So, he must get married to someone who has many planets or at least Moon in Leo. His partner will be able to understand him good!