What is limit price when buying stock

How does a limit price work when placing a stock order?