When we use the word "to buy" and when the word "to purchase"? I do not understand the difference between these words.
If it comes to the sense of obtaining something by paying money, both "purchase" and "buy" are usually used interchangeably as a verb. Nevertheless, the use of "buy" is more common in daily conversational English than that of purchase. The use of purchase is a bit formal.
In some contexts, however, it sounds more natural to use buy instead of purchase such as I will buy him the book/let me buy you a drink.
Similarly, when you use these words as a plural noun, it's more natural to use purchase in some contexts such as she opened the bag of her purchases/her purchases were so heavy that she had to take a taxi. Besides, you often say in informal English when you buy something at a low/high price "it's a good/bad buy". "It's a good/bad purchase" sounds a bit weird.
They mean exactly the same thing 99.9% of the time, and typically you can freely use purchase where you'd use buy and vice versa.
One exception: There at least one expression (possibly regional) involving buy that would sound weird if you used purchase, for example:
A: He just told me that she's sick and won't be coming in today.
B: I don't buy that. She probably just is hungover from too much partying last night.
Here, "I don't buy that" means "I don't believe that" - using purchase here would not work.
The saying "bought it hook, line, and sinker" - meaning to have believed someone's words later discovered to be deceptive - also would not work with purchase.