Can a wizard have a swarm of animals as a familiar? An Imp is a possible familiar and has a CR of 1, and most swarms have CRs of 1/4. Does it have to be a single creature or could the spirit take the form of a swarm of ants/bees/other hive-minded creatures? Thanks.
No; the spell tells you the options for familiars
The find familiar spell description tells you the entire list of options for familiars:
You gain the service of a familiar, a spirit that takes an animal form you choose: bat, cat, crab, frog (toad), hawk, lizard, octopus, owl, poisonous snake, fish (quipper), rat, raven, sea horse, spider, or weasel.
Anything beyond that would be a houserule by the DMs.
Wizards can't summon imps with the spell
Note that imps are not an option for familiars for wizards. Imps (and a few other forms) are only added as an option for the familiar's form for Pact of the Chain warlocks:
You learn the find familiar spell and can cast it as a ritual. The spell doesn’t count against your number of spells known.
When you cast the spell, you can choose one of the normal forms for your familiar or one of the following special forms: imp, pseudodragon, quasit, or sprite.
Additionally, when you take the Attack action, you can forgo one of your own attacks to allow your familiar to make one attack of its own with its reaction.
A swarm isn't "an animal" form; it's a bunch of animals
This hasn't been addressed specifically for find familiar, because it doesn't need to be, since the spell description gives you the full list of options for what forms your familiar can take. However, Jeremy Crawford has answered similar questions on Twitter about using Wild Shape to turn into swarms here:
He's also commented on whether swarms count as a single creature in other cases:
Would a swarm of quippers count as one or multiple fish when it comes to things like the trident of fish command?
By the Rules as Written, you can't; the spell specifically says what you can pick from, and that's it. A few class features adjust the list. (The imp is limited to the Warlock, who specifically gets a few high-powered pets in addition to the normal list.)
But what about Rules as Fun? I'm all for DMs allowing players to pick unusual familiars, provided they're within the realm of the reasonable. A scorpion or badger would be entirely reasonable requests.
However, it should be ridiculous on its face to suggest that you could choose between a bat, rat, snake, quipper, or raven and a swarm of those same things, so really only the Swarm of Insects is up for debate here. At a first glance it's pretty obviously vastly overpowered for the role. It has 22 hit points, as opposed to 1 to 3 HP for all the other wizard familiar options, and that's before considering its damage resistances. (Note that familiars can't attack, so the relatively huge damage output doesn't matter in this case.)
It's just barely possible that a half-strength swarm might be a viable option for a warlock (in lieu of a quasit, imp, or pseudodragon), but that'd really be pushing the edge of 'reasonable'. I'd probably allow it if it was particularly thematic for the character to have a swarm of flies or moths at their command, it's just worth being aware that they're much harder to kill than the average familiar.