A typical payment flow with Stripe can be divided in two steps:
Client-side, in your frontend (HTML + Javascript) code, you collect the customer's payment information using Stripe's prebuilt Checkout form or Elements form field(s). This will return a token that you then send to your server.
Server-side, in your backend code (in PHP, Python, Ruby, or whichever server-side programming language you prefer), you use the token in a charge creation request to actually charge the card.
The point of this 2-step flow is that your server only works with card tokens and never with raw card information. This means you never have access to card numbers, which greatly eases the burden of PCI compliance.
Stripe's documentation is pretty extensive and includes many examples and tutorials -- make sure to check it out!