Does it play the tunes? If not, verify that the batteries are installed correctly. If that is not the problem, read on:
I don't know about your particular infant swing, but those I have seen use a vibrating motor to drive the swing. This a small electric motor with an intentionally out of balance weight on the shaft. When it spins, the whole assembly shakes. The drawbacks to this design are that the weight may come loose so the motor spins without turning the weight, the wires to the motor may break off from the vibration, or the motor bearings may go bad from the heavy wear.
You would need to open the housing to see what the problem is. A broken wire is usually easy to repair if you are good with soldering. A loose setscrew on the weight can be secured with a thread-locking compound. A worn motor bearing, on the other hand, cannot be economically repaired. (The shaft of a worn-out motor will have a lot of side play - if it's worn to the point of failure, the armature inside the motor may drag on the field magnet and be hard to turn, or the motor brushes will not make proper contact with the commutator.) These motors are generally very common varieties and are available from Jameco Electronics or Radio Shack. For example, Vibrating Motor 3 Volt DC 75 mA
is $3.25 plus tax and shipping.