Such behaviour only occurs when a theme is edited which is made by a shady theme shop.
They insert spammy links into your footer, and put encoded code into your theme to make sure you keep their links in place
This is NOT WordPress behaviour, and is frowned upon by the WordPress community
Are you able to get into the admin end of your site? To do so directly you would use the url
swapping out domain for your actual domain. If you can do it that way, then you can switch your theme
If not, you would need to use FTP, or a file manager/c-panel if your host offers it to delete the offending theme
It would be found in the wp-content -> themes folder
You could delete the offending theme, which would reset you to 2011 and allow you back into your site