A flat (b) does the opposite of a sharp. Placed immediately before a note, it lowers the pitch of that note by one semitone.
The use of sharps and flats means that the same note can have two different names. For example, F# = Gb and G# = Ab. These are referred to as enharmonic notes.
Here are two octaves of the E chromatic scale written on the bass staff. Notice that sharps are used when the scale ascends and flats are used as it descends. This is common practice when writing chromatic passages in music.
As with sharps, flats are canceled by a bar line or by a natural sign.
To improve your knowledge of flats, write the names of these notes below the notation.