Scale-free outbursts of activity are commonly observed in physical, geological, and biological systems. The idea of self-organized criticality (SOC), introduced back in 1987 by Bak, Tang and Wiesenfeld suggests that, under certain circumstances, natural systems can seemingly self-tune to a critical state with its concomitant power-laws and scaling. Theoretical progress allowed for a rationalization of how SOC works by relating its critical properties to those of a standard non-equilibrium second-order phase transition that separates an active state in which dynamical activity reverberates indefinitely, from an absorbing or quiescent state where activity eventually ceases. Here, we briefly review these ideas as well as a recent closely-related concept: self-organized bistability (SOB). In SOB, the very same type of feedback operates in a system characterized by a discontinuos phase transition, which has no critical point but instead presents bistability between active and quiescent states. SOB also leads to scale-invariant avalanches of activity but, in this case, with a different type of scaling and coexisting with anomalously large outbursts. Moreover, SOB explains experiments with real sandpiles more closely than SOC. We review similarities and differences between SOC and SOB by presenting and analyzing them under a common theoretical framework, covering recent results as well as possible future developments. We also discuss other related concepts for imperfect self-organization such as self-organized quasi-criticality and self-organized collective oscillations, of relevance in e.g. neuroscience, with the aim of providing an overview of feedback mechanisms for self-organization to the edge of a phase transition.