While restoring a database in SQL server2008 which is backed up in SQL server 2008 R2 i am getting an error that some compatibility issue. So i can't restore the database as i know that the compatibility level of both 2008 and 2008R2 is 100, So why this type of problem arises?
You can't restore backwards. Once a database is created in a newer version of SQL Server, there have been changes made to it, even in compatibility mode, that make it not possible to restore to an older version of SQL Server.
Database compatibility levels are distinct from SQL Server Database versions. A database that is hosted on a SQL Server will be of the version of that SQL Server and nothing else. When you take this database and move it by any means to a SQL Server that is a higher version, it will be upgraded to that version. You cannot move the database to a lower version of SQL Server. When it is first moved to a new SQL Server it will have a compatibility mode that matches the previous server version. This means that it will not have the features of the newer SQL Server version but crucially it will (more or less) have all the features of the old version. This means that you can often move a database to a newer server and not have too many problems with any applications that work with the database. As you make changes to you application you can change the compatibility level to the higher version and then make use of the new features. To have an older version of SQL Server host your data you will have to extract it and load it with some external process (@Grant Fritchey has mentioned Red Gate tools that can do this). There is no native method to move a database to an older version of SQL Server