I understand that supersonic airfoils have better performance supersonically, but it seems at if they are not always used for any aircraft that goes supersonic and that supercritical airfoils are often used instead. What Mach number or other quality determines whether a plane will go with supersonic or supercritical airfoils?
Normally, supersonic fighter wings for which airfoil information is published use a very thin NACA 6-series section with very little camber, such as
Aircraft root airfoil tip airfoil McDonnell Douglas F-15 NACA 64A006.6 NACA 64A203 General Dynamics F-16 NACA 64A204 NACA 64A204 Lockheed-Martin F-22 NACA 64A?05.92 NACA 64A?04.29
This information is from The Incomplete Guide to Airfoil Usage by Dave Lednicer. As you can see, the F-16 uses camber throughout, indicated by the 0.2 design lift coefficient of the airfoil, while the F-15 uses an uncambered root airfoil.
Those airfoils are chosen because flow around them at supersonic flight speed is still heavily influenced by subsonic flow characteristics* as long as wing sweep allows for a subsonic leading edge. This produces nose suction which is very helpful to keep drag down. Delta wing aircraft enhance this nose suction by cambering the outboard leading edge (conical camber).
Common to all supersonic wings is their minimization of wing thickness, because wave drag will grow with the square of thickness. Typical sections use a relative thickness between 4% and 6%. In case of the F15, thickness varies between 6.6% at the root and 3% at the tip.
Supercritical airfoils work best in a narrow Mach and angle of attack range and are used for transsonic designs (flight Mach number between 0.7 and 1.0). Fighter aircraft with their wide variety of speeds and angles of attack will rarely profit from using them. The strongly negative pitching moment of supercritical airfoils (resulting from rear loading) makes them unsuitable for most fighter designs.
Supersonic airfoils are reserved for designs with a supersonic leading edge, like the F-104 or X-15 wings and tail or the XB-70 canard. They are only used if top speed exceeds Mach 2.2 and the sweep necessary for a subsonic leading edge would be too high for decent subsonic performance.
* For those with a severe problem of reading comprehension: Of course the flow over a swept wing is supersonic when the airplane moves at supersonic speed. Only the behavior of the flow is like that at subsonic speed as long as LE sweep is higher than the Mach cone angle.
Designing an aircraft to travel at mach 1 and beyond presents a whole host of challenges that must be overcome. For example, beyond the obvious issue of airfoils, turbojet engines generall need to solve the problem of supersonic intake - slowing the air down as it enters the engine to speeds below mach 1 before compression and ignition. The considerations involved in supersonic flight can greatly increase the design and manufacturing cost of an aircraft.
Therefore, to get the most speed and performance out of an aircraft while still keeping it subsonic, designers will opt for a supercritical wing. Normally, air passing over the airfoil of a wing reaches supersonic speed before the aircraft itself does. To minimize this, supercritical wings are designed with a flat top and a lower aft curvature to reduce the size of the shockwave and reduce drag on the aircraft when flown at near supersonic speeds.
If an aircraft is designed to spend most of it's time in cruise at near supersonic flight, designers will often opt to use a supercritical wing to optimize this characteristic - even if the plane is capable of supersonic flight. While this airfoil shape may not be the best design for prolonged, efficient supersonic flight, its shockwave reducing characteristics still provide some benefit over airfoils designed for normal subsonic flight. They are also much more stable at slower speeds than dedicated supersonic wings.