Certain units only attack specific targets during a Battle. For example, the Tank is very powerful but will only target vehicles and structures while ignoring all other unit types. You can check what enemies a unit will target by tapping on the unit in the Squad menu.

All the Best,
Hothead Games