Hi, good question.
いえ(家) = house (physical building)
The basic meaning of うち(内) is INSIDE, however, we use it for HOUSE and MY (the group which I belong to).
Here are examples:
(When we use うち as HOUSE, they are interchangeable.)
私のいえ = 私のうち = my house
いえの中 = うちの中 = in the house
(When we use うち as MY, they are not interchangeable.)
my mother = わたしのおかあさん = うちのおかあさん (not いえのおかあさん)
my school (the school where we go to) = わたしのがっこう = うちのがっこう (not いえのがっこう)
I hope this helps you. Un saludo.