You can change attack-type through certain upgrades (for example Flying Machine Bombs), through certain abilities that changes unit type (for example chaos) and through certain items (such as Orbs).
If you do it by using Chaos, you need, as was stated above, to create an identical unit type that has a different attack type. As for upgrades or items, you need to modify the second attack of the unit so that it has a different attack type (as you might be familiar with every unit has two possible attacks, though often only one is initially enabled) and then edit the item/upgrade so it enables that attack for the unit.