Motivation
Take a good look at all the text of the spell, and try to figure out the attitude of the creature towards its summoner. Is it positive like that of, in your example, a conjured animal, where:
The summoned creatures are friendly to you and your companions.
Or is it more neutral like what you might get with Planar Ally, where
When the creature appears, it is under no compulsion to behave in any particular way. You can ask the creature to perform a service in exchange for payment, but it isn't obliged to do so.
Or is it more hostile like that of the forces you could call up with Summon Greater Demon, where:
On a successful save, your control of the demon ends for the rest of the duration, and the demon spends its turns pursuing and attacking the nearest non-demons to the best of its ability.
Let's assume for the sake of this question it is a creature that is "friendly" to the caster - and wants to help in whatever way it can (or, depending on your cosmology, at least is compelled by the power of the spell to help in any way it can).
Reasoning
So, we have a creature or creatures who are highly motivated to help their summoner in any way they can - but who haven't been told what to do just now. What should they make of the situation?
They can conclude that their summoner wants them there. Most of these spells have a duration which includes Concentration. As concentration spells, their summoner can dismiss them at any time, no action required. They have not been dismissed; ergo, they can assume their summoner, to whom they are friendly, still wants them there even if they have not been given a specific command. Thus their desire to 'defend themselves' should include sticking around - they will not run away, will not run so far from their caster that they are out of range of the (often verbal) commands. They will do what they can to keep themselves on the board and in play.
They can conclude that their summoner does not want them taking offensive actions at the moment. Most of these spells have a casting time longer than one action (Conjure Animals and Conjure Woodland Beings being the exceptions). Typically these are not cast in combat, so their summoner will have had time to brief them on their responsibilities ('stay at my side until I say go, then you two attack the caster and you two ready actions to grapple anyone that approaches me'). In the case of the creatures that are actually likely to be summoned in combat (animals and woodland beings), the caster can easily give them commands:
They obey any verbal commands that you issue to them (no action required by you).
So if they haven't been given a specific command, it is reasonable to conclude that their caster, with whom they are friendly, doesn't want them doing anything at the moment other than protecting themselves. Maybe the caster's ally is about to drop an AoE and they are supposed to rush in later. Maybe the caster is about to charm an opponent. Maybe they are just there to look menacing without upsetting a tense negotiation. They don't know the reason, but they can be pretty sure that the caster doesn't want them to act.
Results
Now they are faced with a decision - they can't act aggressively and seek out opponents, for fear of upsetting whatever complicated and contingent plans their caster has. And they can't simply allow themselves to be attacked, because they know their caster wants them to remain. Given these constraints, they will defend themselves in whatever way is likely to maximize their survival, and take any Actions available to do so. If they are attacked by something whose remaining hp are low compared to their damage output, they might Attack back if eliminating the source of the attacks on them is the best method of self-defense. If the thing attacking them is slower than they are but more powerful, they might use a combination of Dash and Disengage to try to remain out of reach, all the while circling around to keep themselves in command range for their caster. If the thing attacking them is both faster and more likely to reduce them to 0hp before they can do the same to it, the best course of action may be to simply Dodge and hope they are still in play when the caster is ready to command them.