Microsoft provides a free edition of SQL Server for training and education purposes. Free edition of SQL Server 2008 R2 can be downloaded from the below link.
This edition is called SQL Server 2008 R2 RTM Express edition
It has downloadable packages for all the architectures – X86, IA64 and AMD64.
Additionally SQL Server R2 is also available for 180 days free trial. This can be downloaded from the below link.
SQL Server 2005 express edition is available for free download in the below link.