Linux is free but you may have to pay for the cost of CD's if you can't burn them yourself. Some Linux distributors charge for their distros, but also provide free versions if you don't need technical support. Linux distros contain software that uses various opensource Licences and some commercial ones. The kernel itself uses the GPL licence and you can find out more about it from
here. As for security, Linux is generally more secure than windows and is immune to windows viruses, trojans and worms.