Key/value pairs are usually described as 2 values with quotes, for example:
"teamnumber" "1"
The first value, "teamnumber" is the key, and "1" is the value. When you enter it in the box, don't use the quotes. Once you've added the key/value pair, it should show up as two quoted values in the entity box.
To set up your flags and team spawns, you need to first set your worldspawn keys. Deselect everything and hit "e". Then make sure the following key pairs are there:
"classname" "worldspawn" -- should always be there.
"maxteams" "2" -- number of teams in the map.
"gamemode" "4" -- Team CTF
"team1" "red" -- first team is the color red.
"team2" "yellow" -- second team is the color yellow.
"sky" "pbsky3" -- set the sky you want (for outdoor maps).
"message" "My First Map\nBy Spook" -- name of the map displayed in the console.
Next you need to create spawn points. Select info_player_deathmatch and hit "make entity":
"classname" "info_player_deathmatch" -- selected from dropdown.
"teamnumber" "1" -- red players will spawn here (as designated by worldspawn).
For flags:
"classname" "flag"
"teamnumber" "1" -- red flag.
"gamemode" "4" -- only appears in CTF mode.
For bases, you need to make a brush entity. That is, make a brush (it must be rectangular -- you can't have anything angled), and with it selected, bring up the entity window and select "base" and hit "make entity." It should look like this:
"classname" "base"
"teamnumber" "1"
"gamemode" "4"
If you want to support multiple game modes, just add the game mode values together. For example, if you want to support CTF (4) and 1-flag CTF (2), put "gamemode" "6" in the worldspawn. For a white flag, use "teamnumber" "0" and "gamemode" "2". You'll need to put "gamemode" "6" on the bases, too, so they will be present in both 1-flag and CTF mode.