For example, if someone is offered a choice between eating a piece of food they don't like or throwing it away, they may say "spit or swallow?" to express the undesirable nature of both choices. It implies that there is no desirable outcome and the person has to make a choice between two equally unappealing options.
The phrase can also be used in a more figurative sense to describe situations where individuals have to make difficult decisions between two unfavorable choices. In such cases, "spit or swallow" highlights the lack of a clear or ideal solution, forcing individuals to choose between two less than desirable outcomes.