The PortFast feature is an enhancement in legacy STP and PVST+ and is standardized for RSTP and MST. Basically it defines ports to be Edge ports.
Edge ports come online in a forwarding state and does not generate topology change events, and is not influenced by the Sync step in a Proposal/Agreement procedure. Edge ports send BPDUs but do not listen for BPDU’s.
PortFast being applied to access ports is beneficial because it accelerates the port’s transition into forwarding state, and fixes problems with DHCP timeouts, and also prevents the port from being put into a discarding state during the proposal/agreement process.
The main thing to remember is to never enable portfast on trunk ports to other switches.
When you enable portfast on a port that connects to other switches, hubs, or routers…those connections can cause physical loops. Spanning Tree must go through the full initialization procedure, otherwise a loop can bring the network down. There can be a window of time when packets are continuously forwarded in such a way that the network will not be able to recover if STP is unable to process packets properly on these port types.
By enabling portfast on a trunk port you’re removing the ability of the switch to send TCN notifications to the Root in the event a trunk goes down. You do not want to remove the ability for the network to detect a significant event by putting portfast on a trunk carrying important traffic.