A stock split increases the number of shares available, without changing the overall value of the company. Like a family of 10 that bought a small-sized pizza (which contains 6 slices) but cut each slice further so it would go round.
For a company, the goal is to make the stock’s price becomes cheaper by increasing the number of shares available, without affecting the overall value of the company. So they could increase the number of shares by a ratio, let’s say “5-for-1”, which means 1 share is divided into 5 shares. The 5 shares would still be the value of 1 share.
Example: In 2014, Apple did a stock split at a ratio of 7-for-1 because the stock was becoming too expensive for potential investors. It was trading at around $650 per share then. So, if you owned 1 share of Apple trading at $645 just before the split, after the split you would own 7 shares of Apple at about $92.
There’s also “reverse stock split”. It involves combining shares. A company could merge 7 shares into 1 share. That could be done to make the stock appear expensive.