Lucky cricket cage! My grandmother used to buy these for us and we'd collect katydids (because we couldn't always find cricket) who were obviously not lucky at all if they were caught and caged by sweaty little kids.
This sound producing action is called "stridulation" and the song is species-specific. There are two types of cricket songs: a calling song and a courting song. The calling song attracts females and repels other males, and is fairly loud. The courting song is used when a female cricket is near, and is a very quiet song.