When you write to the PPU between $2000-$23ff, you are writing tiles to the main BG screen (nametable #0). The two LDA #, STA $2006 selects the starting address...which is like choosing a spot on a map in which to start writing. The positions go like this...
$2000, $2001, $2002, etc up to $201f. - top most line of screen
$2020, $2021, $2022, etc up to $203f. - 2nd line
$2040...
$2060...
etc, down to
$23a0-23bf - the bottom line on the screen
$23c0-23ff - defines the color palette used for different sections of the screen.
If you think of the X position (left to right) as going from 0-255, and the Y position (top to bottom) as going from 0-239...you can locate the position on the screen with this formula...
nametable selection NN (2 bits)
Y coordinate YYYYY (the 5 upper bits)
X coordinate XXXXX (the 5 upper bits)
PPU address (in binary) = 0010 NNYY YYYX XXXX
Upper byte = 20 + (N << 2) + (Y >> 6)
Lower byte = ((Y << 2) AND e0) + (X >> 3)
Or, you can use a tool like NES Screen Tool, and it will calculate the Address for you...(on the bottom line, where it says "off", you add that number to $2000). Download it from here...
https://shiru.untergrund.net/software.shtml
see this topic for similar answers...
viewtopic.php?f=10&t=13860