Verbs in -are, -ere and -ire are infinite forms but, unlike the English verbs, they have no prepositions attached. Sometimes you have to place a preposition before them, and sometimes you don't.
Modal verbs (potere, dovere... can, must...) don't need a preposition. The same thing happens in English:
Posso cantare molto bene. I can sing very well.
Piacere and preferire don't need a preposition, either.
Mi piace cantare. I like to sing.
Preferisco cantare [invece di giocare]. I prefer to sing [rather than to play].
Neither does desiderare, to desire.
Desidero cantare. I desire to sing.
This verb is similar to volere, but volere is a modal verb so no preposition is needed.
Voglio cantare. I want to sing.
Some verbs even need the preposition a instead of the mentioned di/da.
Ho iniziato a cantare. I began singing / to sing.
Ho provato a cantare. I tried to sing.
Then you have some verbs that need di.
Ho voglia di cantare. I feel like singing / I have the desire to sing.
The preposition da is used in sentences like:
Non c'è niente da fare. There is nothing to do.
C'è qualcosa da mangiare? Is there anything to eat?
Che cos'hai [cosa hai] da ridere? What are you laughing for? "What do you have to laugh?"
Sometimes the preposition per is used:
Vado a scuola per imparare a cantare. I go to school [in order] to learn to sing.
Two birds with one stone in here, as we have per and a.
Sapere is a special verb, because:
When it's used instead of "can", it behaves like a modal verb and doesn't need a preposition.
So cantare molto bene. I can sing very well. [I know to sing very well]
When it's used with its primary meaning, "to know", it needs di.
So di aver fatto la cosa giusta. I know I did the right thing. [I know to have done the right thing]
So di non aver fatto la cosa giusta. I know I didn't do the right thing. [I know to not have done the right thing]
As you see, there are a few rules on the use of prepositions before infinite verbs. But since the syntax of English is so much different from Italian sometimes, my advice is to try to learn Italian without thinking too much about the English translation. Literal translations from English to Italian are terrible (just look at the last example, ahah) and they can be much confusing!
Hope this helps!