"After the injected code and links are removed, it is advisable for website owners to change their passwords, check file permissions and ensure that all their software is up to date."
It is often not as easy as this as there is a fundamental flaw in the way your site is coded... for example (PHP) :
$sql = "SELECT * FROM user WHERE username='$_REQUEST['username']' AND password='$_REQUEST['password']";
because the request vars are not sanitized... I can do a sql injection by calling the following URL in my browser :
(h)ttp://targetdomain.com/file.php?username=blah&password=blah;INSERT INTO user (username,password) VALUES ('a', 'b');
(The latter obviously being URLencoded but not done here for clarity)
If your site draws its HTML or parts thereof from the database, you can pretty much inject anything if variables are not sanitized... and you'd be suprised how many developers don't. And since you are probably doing database queries from all your pages, your whole site needs a rewrite for it to be fixed. ; )