This is an especially broad question and thus difficult to answer, in part because the answer is subjective.
Each device you connect has unique properties, with a few exceptions. Many devices implement various interfacing standards and the function of that device dictates what level of specific support is required on top of that.
Very commonly used hardware seems to always have decent Linux support. Some times fringe stuff is supported too. Every case is unique. If you learn to write kernel drivers/modules, then you can learn to support your own devices. Personally, I've been interested in that, but I rarely find something not supported in some form.
If you're thinking of buying something and want to know if it's supported by Linux, use Google. Be sure to search specific model numbers.
For example if I connect a Samsung telephone with modem - does it use Samsung driver that Linux project has put into the kernel or does it work because it's just a standard modem?
Depends on how the phone provides an interface to the modem to the host machine. I'd like to think it'd just use a standardized usb-ethernet feature for that. Do you have a specific model of phone in mind?