Firefox, IE, and security

Everyone says that Firefox is more secure than Internet Explorer, so I’ve assumed it to be true…

But why is it true? Is it because Firefox doesn’t get all the attention that Internet Explorer gets from hackers and stuff. Or is Firefox simply better designed than Internet Explorer?