I guess you mean "ie", not "ue".
In most cases, "uchi" and "ie" are interchangeable.
You can say
きょう、ともだちの うちに いきます。or
きょう、ともだちの いえに いきます。
Uchi is more like a "home," where someone belongs to.
"Uchi no" means "our".
Interestingly, we can say "uchi no ie" meaning "our family/house" and "uchi no kaisha" meaning "our company",
"uchi no gakkou" meaning "our school".
If you buy a house for you to live, both "uchi wo kau" and
"ie wo kau" are fine. If you buy a house for investment (so you don't live there) , only "ie wo kau" works.