For understanding purposes you may think of の as "apostrophe s" or to show possession.
かれのりんご- his apple
建物の入口- building's entrance
This won't be the perfect way everytime, but I was introduced to の this way and I found it helpful so here you go. Hope I made sense xD