There are multiple possibilities that could cause the issues you describe
A severely clogged air filter. If your air filter is clogged then you will be pulling less air into your engine and therefore increase your ratio of fuel and air that is being burned in your motor. This can lead to a very rich (too much fuel and not enough air) condition which would explain your fouled spark plugs.
If you have a check engine light on you may have an issue with your MAF (mass airflow sensor) or an oxygen sensor that COULD be leading to your rich condition which fouled your spark plugs initially.
There is also the possibility that your catalytic converter (a component of your exhaust system that burns unburned fuel) may be clogged from your fuel richness issue. This would further exacerbate your issue of a rough idle and foulded spark plugs.