"She finished writing a letter."
Translation:Lei ha finito di scrivere una lettera.
This finire di is one of the "phraseological verbs", category that takes a preposition when followed by an infinitive (di/a/per/da), to describe the action indicated by the infinitive (its time).
The preposition could correspond to the to of infinitives but when you're using the -ing form or other costructs of your language this correspondence is not evident.
There are other categories of verbs that act this way and some don't take any preposition before an infinitive (modal verbs or the ones acting as the modal ones). Here is more information about all these constructions:
The four modal verbs (dovere, volere, potere, sapere) are followed directly by the infinitive of another verb. Also a few more verbs (about fifteen) can take the same construction.
Other verbs, instead, must use a preposition (either a or di, according to the verb) for connecting the first inflected verb to the infinitive of the second verb. This is called an aspectual construction.
The topic is dealt with more in depth in this old discussion: