What each side does
In an online shop, the frontend shows products and lets shoppers fill a basket. The backend checks stock, calculates the final price, and records an order. They often communicate through an API.
The frontend usually runs in your browser or phone app; the backend usually runs on servers elsewhere. A server may also prepare a page before the browser displays it. The backend must check important details such as prices, because someone can change what appears on their own screen.
Who builds them
Frontend developers focus on the parts people use. Backend developers focus on the data and rules behind them. A full-stack developer works on both.