Whenever you are unsure how to use a command, look it up in both the online command reference and also the unofficial command reference guide. Both in the Ed Depot. There you will find explanations and examples, as well as the formal description of how to use the command.
However, if you just want a squad to attack a town once the player has completed an objective, then I wouldn't recommend using createUnit. Place the squad in the mission editor, give it the waypoints you want and control its progress with switch triggers. Tute in the Ed Depot if you're not familiar with them.