If an astronaut went into space with a sealed container of oxygen and opened it up in space and let all the oxygen go, what would happen to it? would it all just dissipate into some other particle or matter or would it just stay there until something consumed it
Gases tries to occupy all the volume of the container in which they are encased in equilibrated pressure. This happens because the gas molecules are always colliding and kicking each other in a 3D high velocity brownian motion. The result is that the gas molecules occupies all the container's volume homogeneously.
So, if the sealed container is opened up in space, the oxygen would quickly leak out, because the molecules near the vacuum edge would be instantaneosuly kicked out by the gas innermost molecules. This would happen rather quickly and in a chained manner, but is dependent on the size of the open hole. Macroscopically, the result would be that all the gas would be running out in a form of a wind/jet out of the open hole into outer space. This would only stop when all the molecules becomes too far apart from each other to have any further intermolecular interaction.
This means that the oxygen (or any other gas) would be dissipated into outer space. The gas molecules would initially be spread out by the intermolecular collisions and then would go outwardly due to the momentum acquired from each individual gas molecule.
When freed in outer space, each molecule would eventually reach something else to interact, so they could be attracted and retained by some gravity well (most likely from a planet or moon), or interact with some magnetosphere (if near a planet) or interact with some other molecule wandering around, or with a cosmic ray or be catched by the solar wind particles (or any of the equivalent if this happens near some other star).
If this happens in intergalactic space where there is no body with appreciable gravity or magnetic field nearby, no stellar wind and the cosmic rays are very sparse and rare and the very few that exists are randomly directed, then the molecules would just spread out in virtually linear trajectories and travel the intergalactic space lonely, quietly and virtually undisturbed for some billions or trillions of years. In their journey, each molecule would only very occasionally interact with some other molecule (likely to be hydrogen) or some other lost particle wandering around.