Hello cpt.Piggy, and welcome.
When you make attacks in Age of Sigmar it's the same method whether it's in the shooting phase or combat, at least for any normal attacks. Some unit's warscrolls have other abilities that can be used in the shooting or combat phase and cause damage, but those rules are explained on the warscolls)
So, you need to be clear of the distinction between a UNIT and a MODEL for a lot of this.
A unit can be a single model, or a number of models, it's explained on the warscrolls, heroes are single model units, as are monsters. War machines, generally have a unit of the machine, and a unit of the crew, so two units, that work in tandem.
When making an attack, each MODEL in a UNIT can make an attack at an enemy UNIT that is within range of their weapon. MODELs with more than one attack, an target different UNITs with each attack on their profile, so you can have a unit split shooting or combat attacks against UNITs, but also individual MODELs can split attacks against different target UNITs
With a cannon, it has * for the attacks, which means you need to refer to the other table, and it will show that if there is a crew unit of 3 or models within 1", then it can make 2 attacks in the shooting phase
Supposing you decide to split your fire, with one of those targeting a Hero, which is a UNIT of one MODEL, and the other shot against a UNIT of troops. You can target any enemy UNIT within range of the weapon, and that you have line of sight to, this is get down and look from the model to the target to see if you can see it, use a laser pointer, or common sense. There is no facing or direction you need to target, so you can shoot in any direction.
When splitting fire or any normal attacks, you declare which target each dice you are going to roll is for, before you roll the dice, so you can't change your mind after rolling some of the attacks, if you're especially lucky or unlucky. You have to judge the right amount of attacks to get the job done. Most of the time, all of the models in a unit you'll target against the same enemy unit anyway.
Ok, so you fire one shot at the hero, and roll a 4 or more, so you hit, and the same against the unit of troops.
Then you roll to see if you cause a wound, again you roll a 2 or more for both attacks.
Now the hero might have a good save, 3+ but with -2 rend, that will mean they now have to in effect save on a 5+. What it actually means is a roll of a 5 get's -2 added and therefore the result is a 3, which is a save. Anyway, suppose they roll a 4, so that becomes a 2, and they therefore fail the armour save. That means that the hero who was attacked with 1 attack will take D6 damage, you roll a 4, therefore they take 4 wounds. At this point, some heroes, or other abilities might say they can ignore wounds on a roll of more, but those are rarer special types of ignoring wounds. It's not the same as a save, that is the roll which is subject to rend, and comes after the to wound roll. Anyway, in this case the hero doesn't have any special save, so he loses 4 wounds.
Against the UNIT of troops they have say a 5+ save on their profile, with -2 rend, and no other effects in play, no matter what they roll, they can't make the save. Only one dice would have been rolled for the save, and it would fail, so you then apply the damage, which is D6 again. and suppose you roll a 3. That means 3 wounds are caused to the target UNIT. If each model in the target unit has 1 wound, then 3 models would be slain, if each model had 2 wounds, 1 would be slain, and 1 would take a single wound. Once you allocate a wound to a MODEL in the UNIT, any further damage caused to the unit would be applied to an already wounded model until it was slain, before any wounds are applied to a new model
The player who controls the unit taking damage chooses which MODELs in the UNIT that took damage to be removed. They don't even have to be in line of sight of the attack, or in range, just they have to be from the same UNIT.