There is a windows PC virus that is able to capture FTP passwords from you whilst you are using them. It then connects to the FTP server and changes the index.* files on your website.
You should do the following:
1. Using a good antivirus software, scan and clean the PC that you use to connect to FTP.
2. Change your FTP passwords and your control panel passwords.
3. Edit and remove the code from your index files. Look for lines that begin "<iframe src=" and then they link to other sites.
4. Ensure that any scripts you are using (Wordpress, Joomla etc.) are all up to date.