Placing Limit order quantity

If I put a limit order wherein I want to buy a particular stock for a certain price and certain quantity and I find a seller who is willing to sell the same stock for the price I wanted to buy at for but he has less quantity of shares to offer compared to what I have bid for, then what will happen to the number of shares that I could not get for that price? Will I get only that many shares at the requested price and the remaining will be cancelled/ be treated as pending?

On First in First out basis, if it gets to your price, you will get that many share from sellers offer, and remain quantity will be open pending.