As part of the Schengen agreement, Switzerland has done away with the systematic control of passports at border points, but customs requirements are still in effect.
Travelling by land or water between Switzerland and its neighbours has been simplified with the country's entry into the Schengen area, a group of European nations that are now covered by a single visa.
That has made systematic passport checks at most crossings no longer necessary. (Airports represent the only border points with non-Schengen area nations, meaning passport and customs controls may take place).
To clarify the origin and destination of goods, border agents may carry out passport checks anywhere. Generally people are allowed to bring in goods worth CHF300 per person duty free, excluding goods like meat, tobacco and alcohol, which are governed by separate rules.
For an explanation on how the Schengen accords affect Swiss customs controls, take a look here.
For a list of cantonal customs authorities visit this page of the finance ministry, which has jurisdiction over customs agents. For more information visit the homepage of the Swiss Customs Administration.