If a Swiss citizen comes to Canada and stays for 6 months, can they travel to USA for example, for a short period of time, and then return to Canada for another 6 months? How long must they stay out of Canada before returning?
In the Canadian law your authorized period of stay in Canada begins on the date you enter the country and ends at the earlier of the date you were permitted to stay until or the date you leave Canada. A new entry into Canada requires you to be authorized for a new period of stay; there are no exceptions based on the country you travel to when you leave. Note that this technically applies even to those with single entry visas, who are instead granted a visa exemption for their subsequent entries within their originally granted period of stay if the travel was to the US or St Pierre et Miquelon (travel to those places is exceptional only in this context, it is mentioned no where else in the law).
Whether you will be authorized for a 6 month stay on a subsequent (or any) entry is a different issue. The default in the law is 6 months but the border officer has the discretion to fix your stay at time requested or to that for which you have the means to support yourself, or even to refuse your entry or place additional conditions on your stay if they suspect the purpose of your visit is inappropriate.
What period of stay they actually give you on a reentry is hence more a matter of policy than of law, and since the CBSA is quite opaque about their policies the only way to guess at that is for people to report what happened to them. My only data point is entirely ambiguous. Friends I took on a day trip across the land border did not have a new stamp put in their passports on reentry, nor did the officer look for the previous stamp, but they had 5.5 months left from the previous entry and told him they were only staying 2 weeks more so the issue wasn't very important. I have no idea whether the CBSA record was left with the original 5.5 month authorized date or gave them a new 6 months that he was too busy or lazy to stamp into the passport.
In any case, in the law you are always free to request a new 6 month stay when entering Canada as a visitor no matter where you travelled to. Whether they will grant it or not is at their discretion. You are also free to apply to extend your stay while inside Canada, which has the advantage that you'll automatically get to stay until they tell you "no".