The producer is the Swiss Army knife of the studio. Among the several roles the producer can play, they often assist in preparing songs for recording, or pre-production. This can include adjusting arrangements and bringing in session musicians.
While recording, the producer coaches the artist through the process, offering suggestions on instrumentation and stylistic choices. They can also help the engineer make signal-chain decisions during the session.
A producer is also referred to as one who composes the music for a song. Particularly in Hip-Hop and Pop music, a producer usually creates and shapes the entire sound of a track before an artist writes to it.