Pretty straightforward. The space, musically, between any two notes that are the smallest step we use usually in music, is called a semitone. So, on a piano, play any note, then the next to it, as close as possible. For instance, the white key between two blacks. Move either way to one of the blacks, and you've gone a semitone. Where there are two whites with no black in between - they are a semitone apart.
Semi being half, a tone is two little jumps. On guitar, the same thing is done using each fret as a semitone - 'cos it is.
Now, you can start anywhere you like. That will be the first note of the scale. Move to the note that's a tone above, (2 steps) and there's the second. Move another tone up, there's the third. So far the pattern is 2 2. Next there's a '1', so that note will be one step up from the last you played.
Hence the pattern 2 2 1 2 2 2 1. Or - T T S T T T S, where T=tone; S=semitone. In US, it's often written W W H W W W H. Same thing, different letters. You work it out !