A pulley is a mechanical device which is cylindrical in shape and can be wounded by a string and may have external mass attached to it.
In the above diagram, we see that there are three forces acting on the pulley: The tension of the string, the external Force acting upwards and and the external weight acting downwards.
A pulley may have its own mass associated with it.
Hence when we study a mechanical system that has massive pulleys, the rotational motion of the pulleys is needed to be considered.
However, an ideal pulley is one that does not have any mass. So, it will have no moment of inertia when it rotates.
Hence this simplifies the problem under consideration. So we generally consider massless pulleys.