understand how IPTV works
Okay, let's bring you up to speed on what some people spend their whole careers on... 🙄
I advise asking only specific questions on huge topics like this. Open-ended ones either result in vague answers or reference manuals.
Up to now i ve seen that multicast packet must be installed...
Not necessarily. That optional package provides a pair of services for getting IGMP across a routing boundary, since it's normally a LAN-bound protocol. If your sources and sinks are on the same LAN, you need neither the IGMP proxy nor PIM-SM. (But you do want IGMP snooping and an IGMP querier!)
what is better
Having only ever used PIM-SM, since it's a multi-vendor standard, I have only a sketchy idea of what MikroTik's IGMP proxy is. Hot take: a variant of the common IGMP querier that sits at a routing boundary instead of operating purely on the LAN. If that suffices, it sounds like a nice feature. PIM can be a pain to get working, so if you don't have to put up with it, don't.
Lets say there is a Router (R1) -> Switch (SW1) ->IP TV ...
IPTV is a double-ended system: source and sink. Which end is the one you're showing? Show the source or sink in relationship to the 3 components you have now to justify that arrangement. Without that, you're calling for either a brain dump or speculation.
Will the switch be affected by...IGMP
It will if you enable IGMP snooping, which is very much recommended along with an IGMP querier if you're not using MT's IGMP proxy, which provides the same function. Without IGMP snooping, multicast devolves to broadcast, which is almost certainly not what you want. It's one of the best reasons to use a managed switch instead of a dumb one in the first place.
and PIM
A switch proper does nothing with PIM.
However, many higher-end switches have PIM features, which makes them routers to my mind. Thus the blurred lines within MikroTik's CRS line, the RB260 versus the RB760, etc.
This is sometimes called "L3 switching" in consequence. What you have isn't a pure L2 device any more, so another name is needed. L3 switch, Cloud Router Switch, whatever. It simply means there are elements of both switching and routing in a single device.
Does the switch need a different configration than the Router
If they did not, the router would be a switch, or the switch would be a router. The fact that you're giving them different names means they have different roles, so the answer is "Yes."
the Headend or the Stream Server of the IPTV as i ve seen should be connected directly to the Router and not the Switch, right ?
That's entirely dependent on details of your installation. You can do it both ways to serve differing designs. What are you trying to accomplish, exactly? This brings us back to the question above: show the source (what you're calling the "headend") and sink (PC, STB, whatever) and explain why there needs to be both a router
and a switch involved.