How can a superbug build up resistance against antibiotics?

Mutations. Superbugs continue to mutate and the mutations that survive are those that are resistant to the common antibiotics used.