I have downloaded the sample database for SQL Server 2012 Express but I am having the following error message whenever I try to attach it:
The database 'AdventureWorks2012' cannot be opened because it is version 706. This server supports version 655 and earlier. A downgrade path is not supported.
Sounds like the server you are trying to attach the database to is not SQL Server 2012. This may be the version of Management Studio / Management Studio Express you're using, but I suspect
SELECT @@VERSION;
will tell you something different. It may just be a connection string mixup if you have multiple instances of SQL Server installed, otherwise you should download and install SQL Server 2012 Express from here.