1) How long have you known your friend?
2) I love tennis. I have played tennis since I was 10.
3) This crossword is difficult. I have been doing it for 40 minutes.
4) Your English is good. How long have you learned it?
We use Present Perfect in these sentences (have known, have played, have done, have learned).
Present Perfect is used for past actions which results are connected with present. We form Present Perfect with the help of the auxiliary verb to have (has is used for the third person singular) and with the help of the third form of the verb.