A bayonet is a knife fixed to the barrel of a rifle. It is used as a melee weapon in hand-to-hand combat.
Worf was "killed" by a bayonet in a Q created reality in 2364. (TNG: "Hide and Q")
A kuttar was a type of bladed weapon that served the same function, issued to the guards at The Albino's compound on Secarus IV. (DS9: "Blood Oath")
Late in the Dominion War, the Jem'Hadar began attaching bayonets to their plasma rifles. (DS9: "What You Leave Behind")