It looks like what happened is that the screw head sheared off. Time for some investigation and ingenuity…
Without the head the screw is going to be a challenge to remove – unless the hole is relatively clean and/or you can get to the other end of the screw. If part of the screw is sticking out on the back side, it may not be too bad a problem. But one way or another you first want to find out if you can get something to hold onto the screw so that you can try to back it out.
First off, see if you can remove the part (the battery retainer?) that the screw was going through. Doing that may give you a bit more access to the screw from the top, and it looks like it might make it easier to reach around and try to get to the back of the screw. If you can do either, and can get your fingers or a tool on the screw, try backing it out. Getting it out even a little may make it possible to use a pair of pliers or vice grips to start turning it out.
If you can't get a hold on it, you may be able to tease it out with a screwdriver (don't press too hard, friction on the threads is not your friend), or with a drill running in reverse – or if you can find one, a left-hand drill bit or small mill.
If that fails, then do a search here (and there and everywhere) for something like "remove broken screw" or "extract broken bolt." Here are a couple of similar questions with answers that might help Is there a way to remove a broken screw?, Best way to remove broken bolt from intake manifold. Don't worry about where the bolt or screw is, the technique is basically the same.