Barracudas eat small fish, octopus and shrimp. Barracudas hunt by watching their prey and waiting. These fish have great speed and use it to quickly attack, rip their prey apart and then swim back and forth eating the pieces.
There's an assumption that barracudas attack people purposely, but in most barracuda attacks the fish mistook something shiny on a swimmer for a small fish. Barracudas rely on their sight more than their smell when hunting, which means swimmers who wear jewelry or shiny bathing suits increase their risk of being bitten.
People who eat barracuda are at risk of becoming sick. It's thought that the small reef fish the barracuda eat have a high toxicity level which contributes to food poisoning in humans.