In uniswap V3 the balance of the tokens is based on the tick / price range and the current sqrtPrice.
As the price travels through a active tick range it will start 100% token0, in the middle it will be closest to 50/50, and at the end of the active tick range it will be 100% token1
this is how the contracts are able to concentrate a users liquidity.
V3 pool liquidity is held in Active tick ranges, which is based on the tick spacing of the pool which is determined by the pools fee.
0.3% == 60 tick spacing, 0.01% == 1 tick spacing, 0.05 == 10 tick spacing, 1% == 200
The tokens will sit only within ticks that are evenly divisible by the spacing. So swaps of tokens will stay in the tick range in which they were traded, if it crosses a tick range during the swap, then the tokenIn will be split at the tick price it crosses and x amount will go to first tick then second tick, going as many tick ranges as needed for the swap