How do shields work

I just started this game and I am very confused about the shields on the islands. Do they get used after the drillers the drillers on an outpost get killed because when some one attacked me and I had more drillers that him my shield still went town to 7 from 10. Note there where no specialists in any of this. I'm just really confused and it's hard to plan attacks out when you don't know how all of it works. Thanks