Fascinatingly enough, we actually do have a very good description of what happened once a Roman army took a city; as you might imagine, it's not pretty. The Romans were a hard people, very straightforward and logical in their own way, and when it came to sacking a city, they did it with a brutality that's almost unimaginable to the modern world. This brutality was not only reserved for the target I'm going to describe below - it was standard practice across the Mediterranean. If a city resisted the Romans, it had best fight to the death.
Polybius is the standard source to turn to here, as he provides a history for what happened to New Carthage, as well as being an eyewitness to both the destruction of Carthage and the crushing of Macedonia. One of the reasons he wrote was for a Greek audience as well (who would be absolutely appalled at the way the Romans did things); his writing, consequently, goes into more detail than Livy does (who generally confines "sacking a city" to one or two words). The relevent passage (Polybius, 10.15.4–16.9) is quoted below:
When Scipio thought that a sufficient number of troops had entered he sent most of them, as is the Roman custom, against the inhabitants of the city with orders to kill all they encountered, sparing none, and not to start pillaging until the signal was given. They do this, I think, to inspire terror, so that when towns are taken by the Romans one may often see not only the corpses of human beings, but dogs cut in half and the dismembered limbs of other animals, and on this occasion such scenes were very many owing to the number of those in the place[.…]
After this [the surrender of the citadel], upon the signal being given, the massacre ceased and they began pillaging. At nightfall such of the Romans as had received orders to that effect, remained in the camp, while Scipio with his thousand men bivouacked in the citadel, and recalling the rest from the houses ordered them, through the tribunes,to collect the booty in the market, each maniple separately, and sleep there, keeping guard over it[….]
Next day the booty, both the baggage of the troops in the Carthaginian service and the household stuff of the townsmen and workers, having been collected in the market, was divided by the tribunes among the legions on the usual system. The Romans after the capture of a city manage matters more or less as follows: according to the size of the town sometimes a certain number of men from each maniple, at other times certain whole maniples are told off to collect booty, but they never thus employ more than half their total force, the rest remaining in their ranks at times outside and at times inside the city, ready for the occasion[….]
All those who are told off to spoil bring the booty back, each man to his own legion, and,after this has been done, the tribunes distribute the profits equally among all, including not only those who were left behind in the protecting force, but the men who are guarding the tents, the sick, and those absent on any special service. I have already stated at some length in my chapters on the Roman state how it is that no one appropriates any part of the loot, but that all keep the oath they make when first assembled in camp on setting out for a campaign. So that when half of the army disperse to pillage and the other half keep their ranks and afford protection, there is never any chance of the Romans suffering disaster owing to individual covetousness. For as all, both the spoilers and those who remain to safeguard them, have equal confidence that they will get their share of the booty, no one leaves the ranks, a thing that usually does injury to other armies.
As I noted: It's harsh, cruel, and yet has an element of straightforward logic to it. There are some interesting things that Polybius does omit, however, that Latin authours (I'll get to Tacitus in a minute!) love to talk about. Namely the raping. Polybius doesn't mention it in this account, despite the fact that it assuredly happened during the looting part of the sack. In his account, it's purely and cleanly divided between massacre and loot - which is pretty honest, considering that Livy says something very similar. Livy, however, makes sure to note that the massacre was focused on all men who can fight - namely, the elimination of any idea of resistance in the conquered city, while the women were considered to be a part of the spoils.
Now, as you can probably imagine, while this model held relatively true (See: Livy 25.30, the sack of Syracuse), there were times during the course of the Republic when the discipline of the army was shoddy.....such as the fall of Carthage. Scipio Aemelianus didn't even try to restrain his army once they'd gotten inside the walls, and the murder/plunder/rape spree was all condensed into one. In this case, it was every man for himself, rather than the controlled looting of New Carthage or Syracuse. Occasionally, these bouts of indiscipline were savagely punished by the general, who had to maintain a semblence of control over these men, or were actually promoted by the general, who would "give the city to the troops." Scipio Africanus did this here (Livy 28.20.6-7):
It was then in truth evident that the city had been attacked out of anger and hatred. No one thought of taking men alive, no one thought of booty, although every place was open for plunder. They slaughtered the unarmed and the armed alike, women as well as men; cruel anger went even so far as to slay infants. Then they threw firebrands into houses and demolished what could not be consumed by the flames. So delighted were they to destroy even the traces of the city and blot out the memory of their enemies’ abode.
Athens suffered a similar fate from the troops of Sulla after they sided with Mithridates in an uprising. Another good example is the fate of Gomphi which, after Caesar's defeat at Dyrrachium to Pompey, did the typical Greek thing and sided with the guy who looked like he was going to win. Caesar wasn't too tickled about this whole thing aaaaand.... (Appian Civil Wars 2.64)
The small town of Gomphi, to which he came, refused to open its gates to him, and he took it by storm and gave it over to his army to plunder. The soldiers, who had suffered much from hunger, ate immoderately and drank wine to excess, the Germans among them being especially ridiculous under the influence of drink, so that it seems probable that Pompey might have attacked them then and gained another victory had he not disdainfully neglected a close pursuit.
Hilariously enough, it's also noted that that brutal rampage ending in drunkenness ended up improving the health of these soldiers, who'd been on starvation rations previously. But let's get down to Tacitus, who describes these more undisciplined sacks in horrific detail. The sack of Cremona, in the crazy year of 69 CE, was a result of the raging civil war, and a result of the close victory won by Marcus Antonius Primus (one of Vespasian's men). Here's the quote for you! (Tacitus Histories 3.33.1–3)
Forty thousand armed men burst into the town; the number of camp-followers and servants was even greater, and they were more ready to indulge in lust and cruelty. Neither rank nor years protected anyone; their assailants debauched and killed without distinction. Aged men and women near the end of life, despised as booty, were dragged off to be the soldiers’ sport. Whenever a young woman or a handsome youth fell into their hands, they were torn to pieces by the violent struggles of those who tried to secure them, and this in the end drove the despoilers to kill one another. Individuals tried to carry off for themselves money or the masses of gold dedicated in the temples, but they were assailed by others stronger than themselves. Some, scorning the booty before their eyes, flogged and tortured the owners to discover hidden wealth and dug up buried treasure. They carried firebrands in their hands, and when they had secured their loot, in utter wantonness they threw these into the vacant houses and empty temples.
Needless to say, the city burned to the ground as a result. If a general "gave a city to his troops" as a sop like that, no order was expected whatsoever.
Hope that helped to answer your question! A great resource is the article Urbs Direpta, written by Adam Ziolkowski. It's up on Academia.edu, if you want to check it out! For the sake of this writeup, I did steal his translations as well :)