If it is exactly like the old one, then you can hook it up the same way.
If it can't be hooked up the same way, then it's not exacly like it and you should post all the info you can about both (sometimes pictures can help) so someone can try to help you work out which wires you need, and where they need to hook up in place of the old one.
Which readings you will get from which wires, will depend on the system.
Without knowing what you have, then generally, you'll need to hook up your battery positive to the thickest red wire from the controller, as well as the thin red or orange (or other color) wire that's marked (at least in the seller's wiring diagram) as "keyswitch, ignition, doorlock" or soemthing similar. The battery negative should go to the thickest black wire.
Once those are hooked up you'll find about 5v on some wires, and battery voltage on others, and very little between those. Most others will be grounds or signal inputs and have no voltage on them. Some may be serial outputs, and if they are sending data (like speedo/etc to a screen) they'll probably read about half of the 5v because they're actually constantly changing, and that's the average.
The best reference you have is your original controller if you don't have anything from the manufacturer or seller on the new one. It is very likely that most of the wires will be the same between them, though the color order of the phases and halls to the motor may be different for the green, blue, and yellow wires, assuming it's a brushless controller. If it's brushed, then there's only two wires for the motor, and if it spins backwards you just swap them.