It was an internal fight in Sienna, Karl IV supported the party of twelve (Dodicini), probably seeking to extend his influence in the city. According to the German Wikipedia article on the topic, the Dodicini originally came to power with the help of the Salimbeni family and were favored by Karl IV. They didn't stay long and were replaced by a new council where the Dodicini only had four out of 15 voices. They weren't happy with that and started fighting the new government. When Karl IV came into the city on his way back from Rome he sent out his militia to attack Palazzo Pubblico (the seat of the council). But the citizens resisted and defeated Karl's troops, Karl himself was held captive in Palazzo Salimbeni. In the end the emperor arranged himself with the new government and approved it, got a large sum as a compensation and left the city.
Only a small episode in the turbulent history of the city. Edit: The same story in English can be found here.