Start up Nuke, create an Ultimatte node by clicking Keyer > Ultimatte and connect a foreground and a background image (and any additional inputs you want) to it. Add a Nuke Viewer node so you can see the result.
In Ultimatte, you have a number of inputs you can use to connect images and mattes that you need to key your footage. Connect the following inputs to your images and/or mattes as necessary:
• foreground (fg) - Connect your foreground image to this input.
• background (bg) - Connect your background image to this input.
• clean plate (cp) - Connect your clean plate to this input. For more information on clean plates, see Using Overlay Tools and Screen Correct.
• garbage matte (gm) - Connect your garbage matte to this input. A garbage matte is often used to clean up screens that are not a constant color or have lighting rigs in shot by forcing the alpha transparent.
• holdout matte (hm) - Connect your holdout matte to this input. A holdout matte is used when foreground objects are the same color or very close to the backing color. The holdout matte is used to let Ultimatte know that the pixels in the holdout matte region should be considered 100% opaque. Note that, unlike the other inputs, this input is hidden and appears as a small triangle on the left hand side of the node.