A card's colour identity is its colour plus the colour of any mana symbols in the card's rules text. A card's colour identity is established before the game begins, and cannot be changed by game effects.
The Commander's colour identity restricts what cards may appear in the deck. Details
Cards in a deck may not have any colours in their identity which are not shared with the commander of the deck. (The identity of each card in the deck must be a subset of the General's)
Lands whose type includes swamp, island, plains, forest and/or mountain (e.g.: basic lands, shocklands, dual lands, Shadowmoor special-basics, etc) DO contain the corresponding mana symbol(s) as per CR 305.6. As such, while they are "colourless" they do have a colour identity and may not appear in a deck unless the Commander is of the appropriate identity.
While hybrid mana symbols may be played with either colour mana, they contribute both colours to the card's colour identity. Therefore they may only be played with a Commander whose identity includes ALL of the hybrid symbols' colours.
Basic land words (swamp, forest, etc) in the text box of a card do NOT represent a coloured mana symbol. They are not restricted to Commander of the same colour identity.
Reminder text is not included in the colour identity of a card.
An Example of what cards are/aren't allowed in a three colour deck.
A deck with Phelddagrif (Casting cost 1UWG) as the Commander may not contain any cards whose colour identity includes red or black.
These cards would all be illegal in a Phelddagrif deck:
Goblin Piker (Its mana cost contains a red mana symbol)
Elves of Deep Shadow (Its ability contains a black mana symbol)
Talisman of Dominance (All sorts of verbotten mana symbols)
Life//Death (Three shall be the number of the colours)
Degavolver (... right out)
Our Phelddagrif couldn't use any of these lands:
Underground River (Obvious, see above)
Godless Shrine
Badlands
Leechridden Swamp, etc)
Phelddagrif may not call upon Boros Guildmage for help
Phelddagrif IS allowed to use:
Esper Panorama
Shard Convergence