If you have a look at the bullets on close combat it sets out conditions on which models can attack which units in close combat.
So, for example, we have model "A" in close combat:
1) IF A is in base to base with enemy unit B and no other enemy unit, A MUST allocated all attacks to unit B
[remember
ICs are units in combat

)
2) If A is in base to base with enemy unit B AND enemy unit C, A can choose whethr to attack B or C, or to split his attacks between them.
3) If A is not in b2b with any enemy unit, but is within 2" of a model from his unit in combat with enemy unit B, he can fight and has to allocate to B. And similarly if he is within 2" of moels in his unit that are in base with B and C he can choose to split between B and C, same as situation 2
Remember you work all of this out *after* you defender react, and also have a look at the
BRB errata which adds another bullet point to clarify what happens when a new unit charges in to the ongoing combat (you still work it out as above, basically)
Hope that helps...