Number and case.
Singular (one button):
- nominative - der Knopf
- genitive - des Knopfes
- dative - dem Knopf ("dem Knopfe" would be very old-fashioned or poetic)
- accusative - den Knopf
Plural (many buttons):
- nominative - die Knöpfe
- genitive - der Knöpfe
- dative - den Knöpfen
- accusative - die Knöpfe
Knöpf does not exist as a noun - but could be the short imperative or first-person form of a verb, as in Knöpf ihn dir mal vor! or Den knöpf ich mir mal vor from vorknöpfen. (Not sure how to translate that. Ignore it for now :D)
There is probably some historical reason, but as far as today's speakers are concerned, "that's just the way it is".
There are no rules which always work to form the plural -- in general, you have to learn the plural along with the singular.
And sometimes, several plural are possible (e.g. der Ausdruck : die Ausdrucke, die Ausdrücke) with different meanings.