[noun] + 上 / 下 / 里 / 外 [noun] + 上面 / 下面 / 里面 / 外面 / 前面 / 后面 / 旁边 / 中间
上, 下, 里, 外, 前 and 后 go after a noun to say where something is relative to it. English puts "on" or "in" before the noun; these come after it, so 书包里 is "bag-inside".
在 + noun + localizer says where something is. An ordinary noun like 桌子 isn't a place until a localizer turns it into one.
A city or country name is a place already and takes no localizer. 家 and 学校 are places too, so 在家 and 在家里 both work.
Put the location at the front and 有 after it to say what is there.
上面, 下面, 里面, 外面, 前面 and 后面 can stand on their own as nouns, where the short forms can't. 旁边 and 中间 have only the long form.
Some nouns take 上 where English would say "in": 车上, 飞机上, 路上, 书上.