A layer-3 switch is a layer-2 switch with added routing functionality - for L2, both behave exactly alike. However, when you create a _routed or L3 port_ that port cannot participate in STP.
STP is required when a layer-2 network has redundant links (otherwise a bridge loop is created, causing a broadcast storm).