Sure, today you could probably make a robot that sews like a human does, but sewing machines have been around for a very long time. In addition to showing how a chain stitch and lock stitch work ...
An illustration of a sewing machine producing a lockstitch. NikolayS [CC-BY-SA-3.0], via Wikimedia Commons. The sewing machine can’t do a backstitch with a single thread as you might expect ...