Buying a sewing machine can be difficult because there are so many types of machines out there. There is a full range of machines, from basic beginners mechanical machines to entirely computerized ones. Each type has models that can sew many kinds of materials but not all of them are able.
Sewing machines made in the early to middle 20th century were solid and simple. They usually only sewed a lock stitch in forward and reverse but were made to sew all kinds of materials because they were the only option. These machines can sew a lightweight sheer material with a thin needle and with a change of needle and tension they can sew through four or more layers of denim. You can usually find these online, at flea markets or sewing machine repair shops.
Mechanical Sewing Machines
Mechanical machines are a basic type of sewing machine where the settings are changed with dials and there is a wheel that controls the motion of the machine. They can sew a range of materials but the lower-priced ones will have more difficulty with the heavier materials. A full-size mechanical machine would have no problem with both thin materials and thick ones but miniature models of mechanical sewing machines are likely to rip thin material and pop thread on just a few layers of middle-weight fabric.
Electronic Sewing Machines
Electronic machines--more expensive than mechanical machines--can be programmed with the touch of a button but are still often controlled with a rotary wheel. They can handle the same fabrics that a mechanical machine can but tend to be more sensitive. To sew a variety of materials with electronic sewing machines it's necessary to make sure your needles, thread and tension are appropriate.
Computerized Sewing Machines
Computerized sewing machines are entirely programmed rather than run by dials and a wheel. These types of machines are often specialized so it's important to make sure that the machine you get is made for a variety of materials. A computerized machine can sew anything from chiffon to thick denim.
Sergers tend to be expensive but they are made for finishing seams, so they are made to sew through practically anything. The needles will need to be changed out for drastically different fabrics but the serger machine itself is made for all types of materials.