A game engine is basically a C++ (or C, but OOP programming is generally used) wrapper to your graphics API. So you're going to first need to learn the API you're planning to base your game engine on. Examples include OpenGL, DirectX, SDL, etc.
Once you've learned that, creating the actual game engine becomes a bit easier. For one thing, many game programming books you buy actually include tips and tricks on creation. And since you already know the API, all that's really left is incorperating these features into functions. Here are some links and books to help you:
http://books.google.ca/books?vid=ISBN1592003516&id=-vifhqAi0SEC&pg=PR10&lpg=PR10&ots=ESSNVItNW3&dq=creating+a+game+engine+book&sig=3Xde77hEVCum_VlRo2woz8iiTf4#PPP1,M1
http://www.samspublishing.com/articles/article.asp?p=29618&rl=1
http://www.google.ca/search?q=creating+a+game+engine