What does it mean to control a battlefield, if I'm defending, and they put a unit there does that mean I'm still in control?

Yes, you retain control of a battlefield while it is being attacked.

According to Rule 187.3.d and FAQ #8259, a battlefield can be both controlled by a player and in a "contested" state at the same time. When an opponent moves a unit into a battlefield you control, the battlefield becomes Contested, but you do not lose control of it simply because the opponent has moved a unit there.

Here is how this works in practice:

  • Retaining Control: You maintain control of the battlefield while it is contested. This means you can still use abilities that require you to control that battlefield (such as "Ornn's Forge" or other battlefield-specific abilities) while the combat is ongoing.
  • Combat Resolution: Control of the battlefield cannot change until the combat or showdown concludes (Rule 187.4.b).
  • Changing Control: Control is only re-evaluated at the end of the combat or showdown (Rule 187.4). If you are the only player with units remaining at the battlefield after combat ends, you maintain control. If your opponent manages to remove all your units and they have units remaining, they will establish control, and you will lose it.

In summary: You remain the controller of the battlefield throughout the combat, and your control is only at risk of being lost depending on the outcome of that combat.