For which purpose Anti-biotic are used?

To cure the bacterial infections

For both A and B

To cure the viral infections

As an immunity against infections