A production agreement establishes who owns the finished content and on what terms crew and contributors are paid. The producer usually owns copyright in the finished film. Separately, underlying rights (script, music) must be cleared.
Legal reference: Copyright, Designs and Patents Act 1988; PACT agreements