This is the typical ignition system wiring diagram for the 1998, 1999, 2000, and 2001 2.5L Ford Ranger and Mazda B2500.
The ignition system is made up of two ignition coil packs and the engine has a total of 8 spark plugs (4 on the exhaust manifold side and 4 on the intake manifold side).
The ignition coil closest to the front of the engine is called the secondary ignition coil and the one behind it the primary ignition coil.
The primary ignition coil feeds spark to the spark plugs on the exhaust manifold side of the engine.
The secondary ignition coil feeds spark to the spark plugs on the intake side of the engine.
NOTE: Testing the ignition coils, to see if they're causing a misfire condition is not hard. You can find the test tutorial here: How To Test The Ignition Coils (1998-2001 2.5L Ford Ranger).