Suppose that you have a bunch of .docx, .mp3, .txt and .xlsx files stored in this directory structure:
/files/
/files/dir1/
/files/dir1/dir11/
/files/dir1/dir12/
/files/dir1/dir13/
/files/dir2/
/files/dir3/
/files/dir3/dir31/
/files/dir3/dir32/
/files/dir4/
/files/dir5/
/files/dir51/
/files/dir52/
/files/dir53/
/files/dir54/
...and you want to recurse into all such directories in order to copy all found .mp3 files to /home/me/music/ but you do not want to preserve such directory tree in the destination (i.e. you want all found .mp3 files to be copied to /home/me/music/ instead of copied to respective directories such as /home/me/music/dir1/, /home/me/music/dir1/dir11/ et cetera).
In such case, at the shell terminal (bash) first run this command in order to access the root of your file search:
cd /files
...and then run this command:
for i in `find . -iname '*.mp3'`; do cp $i /home/me/music/; done
In case you do want to preserve the source's directory tree in the destination, run this command instead (after running cd /files):
find . -iname '*.mp3' | cpio -pdm /home/me/music/
On the above commands, the search is case-insensitive (i.e. matches .mp3, .MP3, .mP3 and .Mp3). Use -name instead of -iname if you want the search to be case-sensitive (e.g. using -name for the .mp3 string of characters will match files ending with .mp3 but not those ending with .MP3, .mP3 nor .Mp3).
It's also important to point out that, in the case of the command that preserves the source directory tree/structure, those folders whose content doesn't match the search criteria won't be copied to the destination. Hence, if e.g. no .mp3 file is found in /files/dir5/, then no /home/me/music/dir5 directory will be created, but if at least one .mp3 file is found in /files/dir5/, then /home/me/music/dir5 will be created so such .mp3 file(s) can be stored inside of it.