I am very much worried about my website's security. Can i secure my website from hackers through coding? Or, is there any other method of security in which i needn't to pay for security. Please tell me the important points about website security too.
Secure what? your code? or sensitive information that may be on your site?
Code, no you cant secure it....read the sticky here about protecting source code.
As for sensitive information, as oracle said, a great deal of thought should go into how you plan to code your site. Server side coding cannont be seen by end users, therefore is always best when validating forms, protecting data, encrypting data, email addresses, and such, and general site security.
If there's data you're really worried about, pages can be "blocked" or secured from view for anyone other than "trusted" members of your site.
The number one most basic rule in my opinion is to treat everything your server receives from a user as a hacking attempt until proven otherwise. Any data provided by a user is absolutely NOT TO BE TRUSTED. You validate all inputs and check very carefully before running any database commands to make sure that nobody is running commands you had not intended (see "SQL injection" in a google search for some background).
If you are on a shared hosting environment then you kind of have to trust that your host has the proper security set up for the rest (ports, DDOS attacks, and such). If you run your own server then you have to make sure that you have those things taken care of yourself.