As Spyhop says, OpenGL is used for rendering graphics only, it's like directX, it makes the pretty things, not the operational things.
If you want collision detection and mavity you need to be looking into making your own system, or for a physics engine, and there are a few available depending on what language you are looking for.
If you are working on the mac/iPhone then try using the cocos2d library and that includes 2 different physics engines as well as loads of other things e.g particle effects.
If you are on the PC there is a C++ physics engine called Box2d (there is a version of it in cocos2d also). This is one of the best 2d physics engines out there.
Just have a look around and hopefully that's pointed you into the right direction.