Hi,
Sounds are generated by either cams on an axle, which may be able to be fitted or in the case of Bachmann (or Accucraft) locos OR by voltage, which can be a separate circuit to the power for the loco.
The 'sounds' are generally pre--recorded on a chip, that is accessed by the electronic board that the chip is part of, and naturally a speaker is needed to be placed somewhere, it may well be supplied with the board. Is the intended purchase to be used inside or outside, inside could be fixed under the layout, outside can be a waterproof system (or brought in for the winter), on or board, or in a trailing van/coach.
In addition I believe they can also be battery powered but am not certain. The difficulty there will be how to vary the voltage and thus the sound, for that a cam may be needed on an axle, or as above a pickup to receive variable voltage.
LGB have a loco sound tender which is self contained and, I think, picks up its own power from the track.
You don't say what the sounds are to be 'of' is it trams or locos, and if the latter steam or diesel?