What is the meaning of [Take Your Medicine]

Accept something unpleasant, for example, punishment, without protesting or complaining