BPDU filters both sending and receiving.
note: If a BPDU is received on a Port Fast-enabled interface, the interface loses its Port Fast-operational status, and BPDU filtering is disabled.
BPDU filtering works differently depending on how it is configured. There are actually two ways to enable BPDUFiltering, "globally" and per "interface".
To enter globally, use the following command:
(config)#spanning-tree portfast bpdufilter default
What this command does, is enable bpdufiltering automatically on all ports that have "portfast" enabled. If portfast is disabled, then BPDU filtering will not be enabled on that port. In global mode, the port will not send BPDUs, however, if the port receives a BPDU the port losses the portfast feature and behaves normally. BPDU filtering is now disabled.
To enter per interface, use the following command:
(config-if)#spanning-tree bpdufilter enable
What this command does, is enable bpdufiltering on the port and the port will not send any BPDUs nor will it process any BPDUs it receives. It basically drops all received BPDUs.
Notice the different configuration modes in the above commands. Cisco recommends to use this feature with extreme caution, as bridging loops can/may occur.