The Setup
This is a good question because whenever we say "conservation of momentum" we are really dodging the issue entirely. It's just that "conservation of momentum" has become a key phrase in astrophysics for summarizing the process of disk formation.
So let's start from the beginning. You have a generally 3D distribution of matter in the form of a gas cloud in space. It has a center of mass. You can ascribe to each particle of mass $m$ an angular momentum $\vec{L}$ according to
$$ \vec{L} = m \vec{r} \times \vec{v}, $$
where $\vec{r}$ is the vector from the center of mass to the particle, and $\vec{v}$ is its velocity. Now the following two facts about angular momentum can be shown:
- As the particles are influencing each other via gravity or even via exchanging photons, the sum of the angular momenta of any pair of particles is conserved in an interaction between those particles;
- When two particles collide, the sum of their angular momenta is conserved.
It can be seen then that the total angular momentum of the system, summed over all the particles, stays constant.
Now it is extremely unlikely that the total angular momentum will be $0$ - adding a bunch of random numbers together, especially considering there are actually large-scale correlations due to eddies and winds and shock waves etc. - will probably get you a rather nonzero value. So this total angular momentum vector picks out a preferred direction (parallel to itself) and a preferred family of planes (perpendicular to itself).
Why Disks Actually Form
We have shown that if a disk of material were to form, we know what orientation it would have, because anything else would have a total angular momentum pointing in the wrong direction. But most sources stop here and don't explain why collapse occurs at all, which is a serious omission.
Some sources will tell you that given the constraint of fixed angular momentum, collapsing to a disk will minimize the potential energy of the system. While this statement is true, it does not in and of itself show that collapse will happen. For that we need a mechanism, which I will describe.
The basic idea is that collisions enable the system to relax to a disk. Consider some particle whose angular momentum is quite out of line with the average of the rest of the particles. In particular suppose its orbit is oriented in the wrong plane.1 Then most of the time when it collides with another particle, it will lose some of that spurious angular momentum and be brought more in line with the average.2 If all particles have their angular momenta pointing in the same direction, then necessarily they are all moving in the same plane, and this is the state toward which collisions bring us.
Now if there were no collisions, we wouldn't have this mechanism. That is why gas forms accretion disks more easily than populations of stars. For example, globular clusters are roughly spherical populations of stars that have remained like that for billions of years.3
One other point here: So far we have shown only that each individual orbit will be brought into a plane perpendicular to the total angular momentum vector, but not that these planes will coincide. That they will coincide follows from the fact that you cannot have a steady-state planar orbit in which the center of mass of the system is not in that plane. If you did, then you would feel an acceleration perpendicular to the plane in the general direction of the center of mass at all points in the orbit and so you would necessarily accelerate out of that plane.4
Why Matter Cannot Migrate Inward
If we have matter orbiting in a disk, those particles cannot decide on their own to move into the center. Often we say "because angular momentum," which is again true but not very explanatory. The fact is, orbits in free space are generally stable. Yes, you are always accelerating toward the center, but your tangential velocity is always keeping you moving away from the center. The planets aren't falling into the Sun because they are moving too fast and nothing is slowing them down.
How Matter Migrates Inward
So now we have a disk. We know these are used to feed matter into the central object in various astrophysical systems, but how does this occur given the argument above? The answer in short is again can be considered in terms of collisions and angular momentum, but this time the magnitude rather than the direction of the latter.
Consider for simplicity a lightweight disk where gravity is determined by the central object rather than the disk material.5 Each particle in the disk will, in the absence of interactions with other disk particles, follow an elliptical Keplerian orbit. The length of such an orbit scales as the semi-major axis $a$, and the time it takes to complete one orbit scales as $a^{3/2}$ according to Kepler's Third Law. Thus for particles with "average" separations from the center $a$, their "average" speeds will scale as $a/a^{3/2} = 1/\sqrt{a}$. That is, the further you are from the center, the slower you will be moving.
Consider two particles in adjacent orbits in the disk, one slightly outside the other. The inner particle will be moving slightly faster. If these particles (whose orbits are not necessarily perfect circles) collide,6 the outer one may drag the inner one, slowing it down while getting sped up itself. So angular momentum has transferred outward.
How does this cause matter to move inward? Well, that inner particle is now moving too slowly for its current separation from the center, and so it enters upon a new orbit with a new eccentricity that brings it closer to the center. That is, if it started off in a circular orbit of radius $a_0$, its new orbit will be an ellipse with semi-major axis $a_1 < a_0$.
It is thus interactions and angular momentum exchange that allow and cause matter to slowly move inward in a disk. Note though that something has to pick up the extra angular momentum, so in general a fraction of the disk will not fall in but rather will be pushed further away.
1 For a generic distribution of matter, the orbits won't necessarily be planar. However, at any moment you can construct the unique osculating orbit that matches the particle's instantaneous position and velocity.
2 If you don't believe that the tendency will be in this direction on average, consider that an inanimate object like a balloon will quickly be turned around if thrown into a headwind.
3 In fact there is an alternate mechanism to transfer angular momentum between non-colliding bodies gravitationally - dynamical friction - but in most cases this is far too slow to be worth considering. This is further proof that potential energy arguments are incomplete without consideration of mechanisms.
4 This is the same reason you cannot have a satellite orbit Earth above a fixed latitude unless that latitude is $0^\circ$.
5 The argument holds even if the disk has nonnegligible self-gravity, but this just fixes certain quantities for a more concrete discussion.
6 Now is as good a time as any to note that collisions are not the only reasonable way of transferring angular momentum. In addition to the aforementioned dynamical friction present, many disks have charged particles and magnetic fields. Charged particles can interact across otherwise empty space if there is a magnetic field coupling them. This can lead to rather complicated phenomena, and studying magnetic effects on disks is one of the topics at the forefront of astrophysical research.