There's no single "computer" in a 2002 Ford Ranger in the way a desktop computer exists. Instead, it has several Electronic Control Modules (ECMs), also called Engine Control Units (ECUs), or simply modules. The most important one, the Powertrain Control Module (PCM), which controls the engine and transmission, is typically located
under the hood, often near the firewall. Its exact location might vary slightly depending on the engine type and other options on your specific Ranger.
Other modules controlling various systems (like the body control module, ABS module, etc.) are scattered throughout the vehicle. You'll need a repair manual specific to your year and model of Ranger to pinpoint the location of each individual module.