The most common case, typical across advanced economies, is to give up on a fixed exchange rate so as to run an open economy with an independent monetary policy. On the other hand, economies that adopt a hard peg give up on independence of monetary policy. Examples include the currency boards set up by Hong Kong and, for a time, Argentina.
More recently, responding to a rapid appreciation of the Swiss Franc as a result of the safe haven effect, Switzerland declared its commitment to defend a pre-announced exchange rate. History is replete also with examples of countries aiming to achieve all three goals at the same time, and failing to do so, often in a disorderly way.