1. A Swiss family in the country were pulling spaghetti off trees.

2. A Swiss family in the country were pulling spaghetti from trees.

(Can we use 'from' instead of 'off'? Are both sentences the same? What is the part of speech of 'Swiss' in the sentences? An adjective?)

Both are fine, and yes, either preposition will work. I'd include "the" in front of "trees," though.

"Swiss" is an adjective, yes.