This question is really interesting as it brings to light a problem in the way Bernoulli's principle is presented to pilots in some ground courses and texts.
TL;DR: the low pressure is caused by curvature of the flow, not high speed itself, so we can place static ports on flat areas of fuselage that lie parallel to the air flow.
To re-state the question, OP (who is presumably learning to fly light aircraft) has been taught that the speed of the airflow around an aircraft is responsible for various low-pressure effects, e.g. fuel being sucked out of tanks and over-reading altimeter when using the alternate static source.
NOTE: For those unfamiliar, when OP refers to "alternate air switch" they are talking about a setup that is present in some light unpressurised training aircraft, e.g. the Piper PA-28-161 (as optional equipment) which have a valve under the instrument panel that can be used in the event of a blockage in the static pressure vents that feed the altimeter, ASI and VSI. This valve opens the static pressure system to cockpit air pressure. This can cause the errors in the altimeter reading, due to pressure in the cockpit being different to the free-stream static air pressure, but not as grave as the errors that would occur with a completely blocked static system.
Clarifying Bernoulli's Principle
Student pilots are usually taught that a wing flies because its shape causes airflow over the top to go faster than that below and, by the Bernoulli principle, this creates a region of lower pressure on the top surface, generating lift.
While this is true, it might lead one to think that this principle of "high speed = low pressure" applies all over the aircraft, so the OP is understandably puzzled about how it is possible to place a static pressure port anywhere on the aircraft such that it reads the correct value.
However, Bernoulli's principle only deals with changes to pressure due to changes in velocity (within a certain flow field) but doesn't say anything about the absolute value of the pressure. It can be thought of as a restatement of Newton's second law (F=ma) applied to fluids (and can be derived from it.) In other words, to change the velocity (speed or direction) of a flow, one must apply a force to it (in the form of a pressure difference.)
The airflow at a distance from an aircraft, while it may be at very high speed, is still only at ambient pressure (which depends only on the altitude we're flying at.)
As the airflow encounters the fuselage, the static pressure will change, but only if the velocity (speed or direction) of the flow changes.
For example, if you bring the air flow to a complete halt (e.g. at the tip of the pitot tube) its static pressure goes up to its peak value (called the total pressure.) Whereas when the airflow encounters a curved surface, the static pressure goes down. This is required in order to accelerate the flow around the surface and keep it attached. However, once the flow straightens out again, it returns to the free stream (ambient) value.
So along surfaces of the fuselage that lie parallel with the air flow, no acceleration (or deceleration) of the flow occurs and the pressure will be equal to that of the ambient air through which the aircraft is flying. If this this wasn't true, and we pretend for a minute that such a surface is at a pressure lower than ambient, this pressure difference would cause an in-flow of air toward the surface (perpendicular to the flight direction,) which would eventually equalise the pressure and bring it back to the ambient value again.
Placement of static ports
This means that parts of the fuselage that are parallel to the airflow and away from protuberances (like wings, struts, etc.) are good locations for the static ports and will read true ambient pressure during normal flight. Side-slipping (beta) can change this, which is why there is often a pair of static ports, one on either side of the fuselage.
Confirmation or fine-tuning of the static port placement can be done during the design of the aircraft by computational modelling of the flow (CFD) or by wind tunnel testing, then verified in the flight test programme (as described in one of the other answers.) If the placement is correct, there is little need for calibration of static port readings, or even the ability to do this on most light aircraft. There are, however, often published corrections for pitot (dynamic) pressure (CAS vs IAS.)
Another good location for a static port is in the form of one or more holes on the side of the pitot probe, as this is usually somewhere near the front of the aircraft in undisturbed air. This is where the static vent is placed on the PA-28-161.
Here's a lovely diagram from French Wikipedia (image credit), reproduced from "AGARD Flight Test Instrumentation Series, Volume 11", that shows the static pressure error along the fuselage of an aircraft. The red line shows the error due to the body only and the magenta line is that due to the combined body, wing and tail. The numbered blue lines show locations where the error is zero - these would be suitable places to put a static port.
Static pressure in the cockpit
The slightly reduced pressure in the cockpit of a PA-28 is due to the shape of the aircraft and where its openings (vents, etc.) are, not the speed of the air as such. For example, there are no pressure seals around the control cables which lead to the low-pressure area at the base of the rudder, but there are good seals on services that go through the firewall, meaning that you don't see much high pressure (ram air effect) from the nose area. Fun experiment: try opening the air vents with alternate static selected, to see if that makes a difference. Note that the flight manual says not to do this if actually making use of the alternate port in an emergency. Specifically, one edition of the PA-282-161 Warrior manual I looked at says "the storm window and cabin vents must be closed and the cabin heater and defroster must be on during alternate static operation." It states that under these conditions the error will be less than 50ft (unless otherwise placarded), which isn't bad at all.