In a standard switch, both instant data transmission (Data Path) and the basic level of switch control (Control Path) are executed by the same device.
An OpenFlow switch separates those two functions. Data Path is still executed by the switch, but Control Path is moved to another switch. The OpenFlow switch communicates with an controller by OpenFlow protocol, which defines such actions as packets receiving, sending, transferring or modifying. Date Path of the switch is called Flow Table. It receives upcoming packets in order to execute a particular action (sending, modifying, deleting).
If the OpenFlow switch receives an unknown packet and cannot match it with any command to Flow Table, then it sends it to the controller. The controller decides what to do with the packet, for example it may reject it or add a registration to Flow Table, so the switch could take a proper action with similar packets in the future.