SDN architecture has layers. The control plane moves out of individual devices into a centralized controller.
Application layer. Network applications that define behavior. Load balancers, firewalls, monitoring tools. They use northbound APIs.
Control layer. The SDN controller maintains a global view of the network. It makes all forwarding decisions and pushes rules to devices.
Infrastructure layer. Physical and virtual switches that forward packets. They receive instructions via southbound APIs like OpenFlow.
You program the controller, and the controller programs the network.