I am not sure on the specifics of Duel but they generally work the same, it appears this way from what I have seen on Duel. It is a bit technical but it is difficult to answer without going somewhat technical, so bear with me. Don't pull down on the hand rail, I will do it for you.
Each gun shoots either a laser or IR beam (different depending on the ride). Each of the 5 guns on the car has a unique binary identification signal which is sent within the shooting IR or laser beam, the beam flashes so incredibly fast with this information, it cannot be seen by the human eye and is sent within something like a thousandth of a second. Binary data can be sent via light via the on and off flashing of the beam.
(In Fact you can now buy LiFI, which is like a form of Wifi but done through household lights, the light literally flashes billions of times a second so cannot be seen by the human eye, or think Fiber Optic, the backbone of the Internet. Same sort of principles in sending data through light to what these rides use)
When the beam from the gun you fired, connects with a target (because of skillz innit), the target sends an IR beam back towards the car, which is picked up by the one of the many receivers on the car itself. Inside this beam, is not only the encoded information of which gun has sent the signal, but also how many points that specific target gives. The car's onboard computer then works out which gun has sent the signal, how many points to award and then updates the car display and stores this information for that player. This whole process is all done in less than a tenth of a second. The power of computers!
Each target has a very basic circuit board as it only has two pieces of information to send back to the car. They are basically like a fancy IR relay if you know what one of those is. Can be made very cheap, relatively speaking. At the end the ride, the car then offloads all the information via a IR sensor to a basic static computer which they displays all the information onto a board everyone can see.
That is the basics of it.