My understanding differs from tarheeldan.
When the market is open, that means that all customers can buy or sell stocks to or from all other customers. I might buy GME in my Vanguard account but the shares I buy might be sold by someone in their Robinhood or Schwab or Fidelity account. The volume is higher because that is where everyone gathers to buy and sell. This higher volume generally helps with liquidity and narrows the bid/ask spread, because there is a higher chance someone out there wants to buy or sell what you're selling or buying, just because there's more people. The bid/ask spread narrows in good liquidity because there is both more price information (more trades happening and more limit orders placed) and more likely that someone will buy or sell at more granular levels.
When the market is closed, it used to be that the market was closed, and you couldn't buy or sell. Some customers wanted to do so, and so brokers started enabling that ability. I think the way they started to provide this feature was that, say I have 100 shares GME I want to sell at Vanguard and you want to buy 100 shares of GME in your Vanguard account. Since Vanguard has my 100 shares GME, they can just update their internal records of who owns those shares, and not go to the main exchange at all. The clearinghouses and the other brokerage firms don't even need to know; it's just a ledger entry in Vanguard's computers.
But since the shares and buyers and sellers are more limited, you get the opposite effects of the main exchange. Volumes are lower, liquidity is lower, bid/ask might spread out, volatility might increase, etc.
I think, but am not sure, that it has evolved from single brokers to mini-exchanges where subsets of brokers can trade after hours between whichever brokers have agreed to be part of those mini-exchanges. This is sort of an intermediate version between the full exchange and single brokerage ledger entry style trading. I don't know much about how it works, though. They used to only do this with the boring well-behaved stocks so they didn't have to worry about clearing and liquidity and gapping and so forth, but now most stocks seem to be available.
These sort of trading platforms extend for a few hours after the main market closes, and maybe a couple of hours in the morning before the main market opens.
...
Imagine you want to buy a gallon of milk. Normally you'd go to the grocery store, which is where most people expect to buy milk most of the time. You'll probably get the best price and you know it'll be there. That's the main market.
But if it's after the grocery store closes, and your next door neighbor has a gallon of milk and you have $2 in cash, you could buy it from them. They might charge you a bit higher price, and they may not have it available, but you don't even need to leave the neighborhood, and the grocery store doesn't care. This is the initial version of after-hours trading.
Or you could go to Craigslist. You'd probably have a better chance of getting a gallon of milk, but it'll still cost you more, and you may have to leave your neighborhood.
Not a very good analogy, but maybe it'll help.