What are the basic feature in linux for security??

Linux is open source operating system. As far as i know it never get affected by viruses!
But i don't understand why? What is the specialty of Linux or other open source operating system?
Why? If anyone can built a open source virus then what happens? The main feature against virus is this but what about other type of securities.
Does Linux offer a proper secure computing? I have never used Linux so i have no experience of this operating system.
Can any one who has knowledge of this type of operating system please answer my question.
How secure Linux is?
This will help to make me confident about using open source operating system.
So i want some good informative answer that can truly explain all the feature of Linux.
Thanks.
