I've heard that I should buy a permit to visit Machu Picchu and Huayna Picchu. Where can I get them? (I've emailed to mtsobek.com travel agency, but there is no response from them). So if there is no way to do it by yourself (online?) then could you recommend any travel agency which may buy the permits on my behalf?
Even if you're with a tour group, you almost all enter at the same point, and will be buying tickets at the gate.
It's important to note that while there's generally a few thousand a day at Machu Picchu, they severely restrict the numbers each day for Huayana Picchu. So if you want one of those (2x200 I believe), you need to make sure you're on the first bus up there, or speak to your tour guide about getting there early. Fight for it if you have to - it's totally worth it. As @Itai says, it's steep, and take insect repellent (never been bitten so much in my life) but the view from the top is totally worth the climb :)
Unless you are planning being there outside of opening hours or for a purpose other than tourism, that is not the case.
When entering the reserve, you buy an entrance ticket. They are valid for one or two days. There is no need to acquire this ticket in advance, doing so at the main gate is typical. Some travel agencies, at least those in Peru, may be able to supply the ticket in advance. If memory serves, I've seen it done a few years ago.
Upon entering, it is a short walk to Machu Picchu and a steep trail up to Huayana Picchu.
One can buy a permit to visit Machu Picchu on https://www.machupicchu.gob.pe/inicio
For more information, see https://www.ticketmachupicchu.com/how-buy-entrance-machu-picchu-advance/#how_buy_machu_picchu_2020_ticket (mirror).