Little maggots on top of my home-made apple cider vinegar, is it bad?
I wouldn't even try to salvage this. It's not worth it.  

The two main problems I see are:


You don't have enough liquid. There should be enough water and apple juice that apples can drown in it.
Even with a lid on, there should be a gauze under or over it. Like in the old pictures of a jar with anything sweet. 


Because those maggots probably originated from fruit flies (or regular flies) that were lured with the sweet scent. And you won't see them under the surface as flies don't lay eggs in water. 

The foam/scum would be natural as your mixture started to ferment.