OK Junior, her's a simple understanding... when you pluck a string your finger is the source of the (mechanical) energy that vibrates the string. A metal string vibrating in a magnetic field creates a small electric current in the wires wrapped around the pickup's magnet. That electric current then gets amplified, using additional electricity, a few times.
If you have a passive bass the pickup signal goes to you "amplifier" (amp). On basses with an active pickup, the signal gets amplified a little first, using energy from a battery.
Inegrated bass amps have a pre-amp and a power-amp. The amount of electricity that boosts the signal in the pre-amp is controlled the gain knob. That signal goes to the power amp, where the signal is boosted once more.
At the end of the chain your speaker takes that amplified electric signal into a voice coil around a magnet that drives a speaker cone, turning the signal back to mechanical energy that vibrates air that vibrates ear drums.
Every time you amplify an electric signal you add some noise. So, in general, it's preferable to dial your preamp gain as high as possible (to maximize the signal-to-noise ratio) without going too high (which causes distortion).
The low-level signal coming from your bass is "instrument level", and active basses generally have a hotter signal than passive basses. Most integrated amps have an attenuator of some kind (an active/passive switch) to account for the difference (i.e., to not introduce excess distortion in the pre-amp stage).
That's the basic story, now go play!