It really has to do with how long you can stay in lane and how many minion waves you are there for to soak up the XP for.
A champion like Mundo can stay in lane for quite awhile, especially if you build an early lead. You can easily become lvl 17 while people are running around at lvl 14.
A champion like Riven is going to need to back a few times and if you take ignite, well, someone already said, you lose XP
Although, to help alleviate your level woes keep in mind a few things:
Think of the tower like a toilet (gross, but bear with me.)
After you kill your lane opponent or you suspect your enemy is going to go roam or be out of lane for a bit, shove that wave into the turret as fast as possible. You want your enemy to miss out on XP while minimizing the amount of xp you lose by backing to shop. This is accomplished by shoving the minion wave to their turret to deny them of as much experience as possible. By the time you get back from the shop, they'll have already been back in lane for a bit to push the wave back and the lane will begin to normalize again, except they have missed out on more creeps than you.
Just Flush those creeps into the tower when its the right time to do so.