How Does Tempo work?

Excuse me, do I need to deploy jaeger and write it to tempo?
Or I only need to deploy Loki to specify the jaeger variable to the tempo address, without any code intrusion.

Tempo is a distributed tracing backend independent of Jaeger and Loki. At Grafana we use Loki as a lookup into Tempo traces, but Loki is not required.

Here are some links that might help.

Instrumentation examples:

Configuring the Grafana Agent to send traces to Tempo:

Good luck!