Well, I would highly recommend going through some Godot tutorials and other learning material, as getting help without knowing how it works isn't that helpful in the long run, but to answer your question: You just need to connect the pressed
signal from a Button node to a script, and then in that script have the function tell an AnimationPlayer node to play. Something like this (untested, super simple example):
extends Node
func _ready():
get_node("Button_Here").connect("pressed", self, "on_button_pressed")
func on_button_pressed():
get_node("AnimationPlayer_Here").play("Animation_Name_Here")