Why are antibiotics prescribed for colds, and are they effective in treating them?

Why are antibiotics prescribed for colds, and are they effective in treating them?