Sawyer, Kate, Hurley, Jack, and Michael were traveling through the jungle for the ostensible purpose of retrieving Walt from the Others. However, Michael was leading the survivors into an ambush in exchange for his and Walt's freedom, and so a tracking party of others was following them from the beginning.
Kate and Sawyer spotted the others in the jungle alongside their trail. They discussed and agreed to fire on them without alerting Jack. This led to a short, one-sided firefight, in which Sawyer shot and killed an unknown other.
The battle was a victory for the survivors, but it brought to a head the ulterior motives of Michael, and Jack alerted the other survivors of his true plans. The second Other present in the battle was allowed to escape the scene.