I have been using SQL Server 2005 standard for quite a while, and it is working great. Now I need to use SQL Server 2012. Will this effect my existing databases? How much risk is involved in installing SQL Server 2012 on a machine that has SQL Server 2005 running?
Yes, you can install an additional instance of SQL Server 2012 (you'll need a named instance if your 2005 instance is a default), and it can happily co-exist without interfering with your existing 2005 instance. None of your existing databases will be touched, and you will still be able to have both 2005 and 2012 versions of the client tools, too (this isn't true for all side-by-side installs of different versions).
You could also opt for an in-place upgrade; this will keep your named instance and upgrade your databases. Need to be careful with this one though; run at least the 2012 upgrade advisor in case you have 80 compatibility issues, queries with old join syntax, etc. This is not an exhaustive check (it can't check queries constructed by dynamic SQL, and it won't check queries submitted by applications either) but it's a good start.
To learn more about how SQL Server behaves with multiple version I would suggest you to read Work with Multiple Versions and Instances of SQL Server
In my experience, you definitely install many SQL Server versions on the same machine. It depends on your OS which support all versions? You can refer link to understand limitation for each version
I recently had the need to have SQL 2005, 2008, 2012 and 2014 all installed on the same machine at the same time.
I did not notice any ill effect.
Except for Win7 complaining about SQL 2005 being a little on the incompatible side of things though it still seemed to work fine for me.
Typically, I'd only enable the services of the versions I needed at any one time.