another use of 'live on' is something like - "I live on $200 a week". "Live in" can also be used in sentences like ' I live in hope", "I live in constant fear that he will find me".
As for houses, you always live in a house/apartment. You actually open the door and go inside, so you live in it. Although I can see why students find this difficult when it comes to things like 'on the train' or 'in the train'. Although you are physically inside the train, having stepped through the door from the outside, in English we tend to say, "I was on the train to..". I suspect this is because it is actually short for 'on board' the train, and we just drop the 'board' part. Same thing with planes and boats. Oh dear, I do feel sorry for people learning English! Good luck.