The 12th house has different meanings in jyotish (Vedic astrology). Generally it can be said that this house is associated with the losses and endings. Those are the losses of all kinds – from financial losses to loss or change in health.
In this house you have to break away from the illusions and ideas that do not serve you any more. The planets in the 12th house give us the tasks we need to work on and where we need to change our behavior towards the problem. Failure to do so can lead to great suffering and loss.
When the Sun is in the 12th house, you have to change your own ego and personality. But when the Moon is in this house, you have to accept and change your own emotions and your own mental burden. Mars in this house requires us to renounce our own power; Venus in the 12th House, however, demands the freedom to material enjoyment. Jupiter demands changing the view of religion, morality, values and happiness. If we have Mercury in the 12th house, then we should change ourselves intellectually. But Saturn wants to teach us to look beyond the material – the body, the diseases, sadness, old age and even death. Rahu brings us the experience to overcome our own illusions and the fear of the future. Ketu wants us to leave the past behind and that we no longer have bondage. Thats why we say that Ketu brings enlightenment in the 12th house. But it is also good if it is positioned in other houses of the moksha, that is the 4th and 8th house.