For newbies (and maybe others), here you have a really good ebook called:
Maximum Security: A Hacker's Guide to Protecting Your Internet Site and Network
You can read it here
Its author explains an enormous variety of things to understand more about security.
Hope it helps someone.