Version error while restoring database
If you mean that you are trying to restore a database backup from a more recent version, such as SQL Server 2008 R2, to a previous version such as SQL Server 2008, then you cannot do such a restore.

You could restore a SQL Server 2008 database to a SQL Server 2008 R2, since the backup can be promoted to the new level.

If you need to move the data to a lower level server it will likely require scripting the database definitions to create a database on the earlier version of SQL Server.  Then the data will need to be copied to that server.

There are a number of posts on doing this, such as:

Restoring a backup to an older version of SQL Server

http://www.mssqltips.com/sqlservertip/2810/how-to-migrate-a-sql-server-database-to-a-lower-version/

EDIT:  Although there is no way just to attach the files and make it work, the good news is that the changes between SQL Server 2008 and 2008 R2 are few.  Therefore, you have a good chance of migrating code and data to the SQL Server 2008 server using techniques such as posted above without any major problems. (Other than the time and nuisance.)