Play a C note on any instrument. C is the tonic (first note) in the key of C which has no sharps or flats. Move up a perfect fifth (which sounds like "so," in "do-re-mi-fa-so"). The fifth note of the C scale is G, and the key of G has one sharp: F-sharp.
Play the G note again. G is the tonic (first note) in the key of G which has one sharp: F-sharp. Move up a perfect fifth (which sounds like "so," in "do-re-mi-fa-so"). The fifth note of the G scale is D, and the key of D has two sharps: F-sharp and C-sharp.
Play the D note again. D is the tonic (first note) in the key of D which has two sharps: F-sharp and C-sharp. Move up a perfect fifth (which sounds like "so," in "do-re-mi-fa-so"). The fifth note of the D scale is A, and the key of A has three sharps: F-sharp, C-sharp and G-sharp.
Continue in this manner until you arrive at seven o'clock on the circle of fifths and the key of C-sharp, as no key has more than seven sharps or flats. Return to C on the circle of fifths and your instrument.
Play the C note again. C is the tonic (first note) in the key of C which has no sharps or flats. Move up a perfect fourth (which sounds like "fa," in "do-re-mi-fa"). The fourth note of the C scale is F, and the key of F has one flat: B-flat. (Although you are moving up in fourths on the musical scale, you are playing counterclockwise on the circle of fifths.)
Play the F note again. F is the tonic (first note) in the key of F which has one flat: B-flat. Move up a perfect fourth (which sounds like "fa," in "do-re-mi-fa"). The fourth note of the F scale is B-flat, and the key of B-flat has two flats: B-flat and E-flat.
Play the B-flat note again. B-flat is the tonic (first note) in the key of B-flat which has two flats: B-flat and E-flat. Move up a perfect fourth (which sounds like "fa," in "do-re-mi-fa"). The fourth note of the B-flat scale is E-flat, and the key of E-flat has three flats: B-flat, E-flat and A-flat.
Continue in this counterclockwise manner until you arrive at five o'clock on the circle of fifths and the key of C-flat, as you will have reached your limit of seven flats.
Repeat the entire process again, over time, until you have the key signatures memorized.