A flap (also: alveolar tap or single tap trill) is a term that describes a speech sound produced when the tongue quickly and briefly makes contact with the ridge behind the upper front teeth. This term is frequently used among cuers to refer specifically to the flap that occurs as an allophone of /t/.
In American English, a flap is produced when /t/ occurs between two vowels and the first is stressed (e.g., butter, thirty, cattle, water). A flap may be less likely to occur if another consonant preceeds /t/ (e.g., hatmaker, helter) or when the vowel immediately following the /t/ is stressed (e.g., gratuity, maternal, Italian). In England, on the other hand, the flap is not likley to appear in dialects even in the context prescribed above. In the International Phonetic Alphabet (IPA), the alveolar flap is represented as [ɾ] (Similar to a hook or to the letter r without the ascending stroke).
A flap can occur as an allophone of other phonemes. For example, it occurs in Spanish when speaking the /r/ in pero.
Hearing cuers often closely associate handshape 5 with the aspirated allophone of /t/ (as in tip). This is reinforced during introductory classes when instructors refer to the handshape as /m f t/ and produce the /t/ with strong puff of air so it can be easily heard by participants. However, that aspirated version is not the only allophone associated with handshape 5.
Handshape 5 represents /t/ in all of its forms. Cuers sometimes complain, "But I don't say 'Batman'" with the same /t/ as in 'tip.'" Of course they're right. But handshape 5 isn't meant to just represent that /t/ that's accompanied by a puff of air. Likewise, the vowel in the words pat and pan is considered the same phoneme, however they are produced very differently. Some savvy beginners will pick up on this difference and want to cue them differently. However, American English cueing does not convey the nasality of certain vowels.
In the example of pat and pan, the answer is pretty straightforward. We don't have any way to cue the difference between the vowel sounds. In the case of flap /t/, the allophone of /t/ sounds similar to an allophone of /d/. One might even say it sounds closer that the allophone in "tip." So cuers want to cue it as a different phoneme.
In reality, it is not a /d/ phoneme. The context of /t/ (between vowels and with stress on the first vowel) causes the loss of aspiration and for the voice to turn on a little early for the second vowel. These do make the /t/ sound more /d/-like, but it does not make it a /d/.
Loss of aspiration also occurs when /t/ or /p/ is preceeded by /s/ (e.g., stay, steam, spit, spice). In these cases the /t/ and the /p/ are not produced with a big puff of air (as they would be produced when someone refers to their handshapes). This can make the /t/ sound more /d/-like and the /p/ more /b/-like. But native English users know that these words are not *sday, *sdeam, *sbit, and *sbice eventhough they start sounding close to those pronunciations.