The answer to this question can be found in chapter nine. The Cobras is what John McNab and his friends call themselves. They think of themselves as a gang of sorts, and anybody that messes with one of the Cobras is technically messing with all of them.
"They called themselves the Cobras. Nobody messed with them."
The Cobras are after Maniac Magee because Maniac seriously embarrassed McNab in chapter seven. In chapter seven, McNab tries over and over again to strike out Maniac, but Maniac just slams pitch after pitch. McNab eventually gets frustrated enough to throw a frog instead of a baseball. Maniac bunts the frog and takes off toward first base. McNab and the rest of the fielders attempt to field the frog and get Maniac out, but Maniac succeeds in going around all of the bases and getting a home run off of the bunted frog. McNab can't stand having that kind of blemish on his record, so he decides that beating up Maniac is as good as striking him out. He enlists the help of his fellow Cobras to hunt Maniac down and beat him up.