The Ark remains in Philistine territory for seven months, because why not take your time getting rid of something that's causing disease and death?
The Philistines seek out the advice of diviners, priests that specialized in dealings with the gods. The diviners tell the Philistines they must offer a sacrifice when returning the Ark to make up for their bad mojo.
If they follow the instructions, God's hand will not continue to punish them. Although, they didn't say anything about God's foot.
The Philistines were told to give five gold tumors and five mice to God as a guilt offering. The tumors were part of their suffering, but the mice lend some evidence to support that the Philistines were suffering from a disease carried by mice. Bubonic plague anyone? In case you were wondering, the five tumors represent the five cities controlled by the Philistines (1-5).
The Philistines send the Ark back to the Israelites on cows because why not? The Israelites sacrifice the cows to God and he was well pleased. However, he wasn't so pleased that the descendants of Jeconiah did not rejoice when the Ark returned.
God, in infinite wisdom, kills 70 of them. The people ask the Israelite town of Kiriath-jearim to come and take it (6-21).