Macaroni is a variety of dry pasta in the shape of narrow tubes originating from Italy and made with durum wheat, usually without egg.
It is normally cut in short lengths; if cut in lengths with a curve it is usually called elbow macaroni. Some home machines can make macaroni shapes but, like most pasta, macaroni is usually made commercially by large-scale extrusion.
The curved shape is caused by different speeds on opposite sides of the pasta tube as it comes out of the machine. (source)
So can hamsters eat macaroni?
Yes it is fine for them to nibble on. Just make sure it is plain macaroni though.