whenever I learn a lesson or even master a lesson I get some coins . I don't know what are they for? perhaps for buying something! or something else?
These are skill points. You collect them like in a game and compete with people you follow. To get a full coin stack every day you have to earn 91 or more skill points. This is the recommended amount of studying per day (but not everyone follows the recommendations, there are other schedules as well).
Anyway, coins make Duolingo more game-like and motivate people.
Also these skill points are indicator measures. One can not measure the effectivity of the language learning process on a daily basis, only the time and the effort that will lead to the knowledge one gains from week to week or in months. The same as loosing weigt :) Its more effective to focus on counting the burnt and the consumed calories than to step on the scaler every day :). It helps discipline if you have a goal by making it a game.