There are two types of optical fiber, mutimode and singlemode. Multimode has a group of fiber strands or 'cores' inside of a larger piece of fiber, which will result in a multi-lobed output profile. Singlemode fiber has only a single strand of fiber, which gives the cleanest output profile. When light enters a fiber, it bounces along the reflective inside walls of the fiber, which is how fiber transmits light with such little loss over long distances, but it has another useful side effect. During the course of bouncing along the fiber, any power inconsistencies in the beam profile are smoothed out. The input can be any kind of mess, but the output will always be a smooth, round flat-top profile that closely approximates a gaussian beam. Of course, this is assuming quality fiber is used, and that the fiber has been cut properly so that the cut surfaces are smooth with minimal aberrations.
Using fiber has the advantage of very little power loss compared to spatial filtering.