Make a real world example with a NPN Transistor
Regarding the amplifier: transistors need some DC-current-flow so the amplifier can vary its internal currents and voltages as the music signal changes.

Thus we will add several capacitors to your circuit, so the source and the load do not upset the transistor's operating point.

1) Get a 3 volt or 6 volt battery. Connect the (-) pin of the battery to the emitter lead of the transistor. Use a NPN transistor such as 2N3904. Install 100 ohm resistor (brown-black-brown-gold/silver) between collector and the (+) of the battery. You may want to install a switch between the battery and the circuit, to not run down the battery.

NOW WE NEED TO BIAS THE TRANSISTOR into a useful operating point.

And once we'd done that, we'll still need to install DC_blocking capacitors on input and output, so our carefully established operating point remains as we designed it.

2) BIASING: this is the Lazy Man bias (works for bipolars and FETs, as long as the transistor is even just sort of OK). Get 2 resistors, of value somewhere between 3,300 ohm and 6,800 ohm. Not really critical. Solder them in series. That midpoint is a key part of the biasing. The resistors don't even have to be the same value, just have them within the range I suggested. So you have two resistors in series, with a midpoint.

3) more BIASING: attach one end of the 2_resistors to the base. Attach the other end of the 2_resistors to the collector.

4) more BIASING: turn on the power. Use a voltmeter if you have one, and measure across the collector_emitter pins. YOu should read about Vbattery/2. About. If less than 1 volt, probably something wrong. If reads the same as the battery, definitely something wrong.

5) So you have the collector_emitter voltage being approximately Vbattery/2. Now for that midpoint of the 2 resistors. Attach a 100uF capacitor from the midpoint to the (-) battery lead. This capacitor gets you higher gain, but its optional. Understanding why this cap is a big step in understanding circuit analysis, so just give it a try.

6) input DC blocking: install another 100uF cap from base to your audio source. have the (+) lead of the cap wired to the base.

7) output DC blocking: install a 470uF or 1,000 uF cap from the collector to the speaker. Wire the (+) lead of cap to the collector.

8) enjoy the music

9) ohhhh you need to wire the RETURN leads of the music source, and of the speaker, to the (-) of battery

Enjoy.