Just to kind of echo Promit, that is how I separate the two.
A render lib can essentially be as simple as this:
function render(material, geometry)
//rendering done here
The your game/app is just a system where by you organise a series of calls the the renderer.render function by whichever means suits your purpose.
The renderer knows nothing of how you structure your game/app, it just sits there waiting for things to draw.
What you draw, the order you draw it, where you draw it... all this information is constructed outside of the renderer.
(obviously this is just high level speak and things can get a little more complex but in general you can make things work like this and it is very flexible)
For instance, a wrote a quick space shooter game using a bitmap blitting renderer and once it was done I was able to swap out the renderer like for like for a GPU based one. Took next to no time at all because there was so very few connections between the two systems.