What happens in the database when a file is deleted?

Just a general question: what happens inside the database when a file is deleted from the computer? And by deleted I mean not moved to trash, but really deleted.