Start by getting your dog to sit in response to moving a treat over their head. We're not yet telling them the word "sit" or a hand signal or anything: that will come later.
When you get out the treats, generally it isn't too hard to get your dog to focus on them. If needed, you can give them a few treats to get their attention. When they start paying attention, move right into training, before they get distracted.
Then hold out the treat so your dog can see it. If they aren't standing, take a few steps back and they will stand as they follow the treat.
Then move the treat directly over the dog's head, towards their back. As the dog watches the treat, they will naturally tend to reach a sitting position. If the dog ends up with rump generally in the vicinity of the floor, praise them, give them the treat, and quickly get ready to repeat the process (nothing bores a dog like long pauses between attempts).
If you don't succeed at first, the first thing to do is to experiment with how you move the treat. It takes some practice to get the position and speed right, so don't be afraid to keep trying.
Start out in a distraction-free environment (normally in your house, away from other pets, noises, unfamiliar smells, and the like). Your dog will work up to sitting even if something else looks more interesting, but improving the ability to ignore distractions is a lifetime project, not something that a dog will do right at first.
Keep your training sessions short (5-10 minutes, or even less). Dogs don't have a long attention span, and doing the training quickly lets you do your thinking at a more leisuirely pace, before and after the session.
In the next section I'll talk about adding commands, but even before you read on, you are ready to start working with your dog. Or someone else's dog - but ask the owner first. Asking "can I give your dog a treat?" usually suffices for a casual interaction. If it is a dog you end up working with more deeply (teaching them commands and so on), keep in touch with the owner about whether what you are teaching is consistent with how they want their dog to behave. Most owners are thrilled to see someone working with their dog, but the amount of advice and "help" that one gets as a dog owner can be overwhelming or undermine other training, so follow the owner's wishes concerning any training you do.