Flies are often tied to resemble insects by the fly fishermen, but there are also flies that resemble a fish(streamers) or are just colorful enough to annoy fish to attack it.
Some fly types:
Dry flies: Are commonly used for "dead-drifting" where the fly resembles an insect drifting with the current on the surface.
Wet flies: Unlike the dry flies, wet flies used under water.
Streamers: Streamers are often tied for bigger fish that resemble pray fish.
You can buy flies from the stores but many people prefer to tie their own.