Previously, I added a poorly written webpart to my default.aspx page. The consequence of this action is that you aren't able anymore to load the page. In this case, the only thing you have to do is to remove the webpart. Removing the webpart in the webpart gallery doesn't solve this.
Append ?Contents=1 to the webpart page's URL to display the Webpart Maintenance Page. On that page you can delete the malefactor.