Whether it's a bullet or an attack, you can have the player spawn an object on a button press that destroys enemies, or lowers their health (which you would have to make a local variable).
If it's an attack like a punch, you would have to check for collisions with an enemy while an attack animation or variable is activated (e.g., When AttackMode=1; PlayerSprite on Collision with Enemy > Enemy destroy - or something like that). To have more finesse, you would have to add extra things like checking the Player's X and Y vs. the Enemy's X and Y.