Machine. Much easier than hand esp for thicker things like collars etc.
Socks: fold tag ends under, put together and use a wide zig zag with no stitch length to just anchor on.
Pretty much everything else, fold ends under, pin at each end, then use either a zigzag or I use a blanket stitch. Try not to do on elasticated parts of the clothing.
You can see it on the outside of jumpers etc (shirts: under collar, trousers: along inside seam, underwear: who cares) but if you use well matched thread it's not an issue in my opinion.
I do all of one bit of clothing together (ie all socks, knickers, jumpers etc together), do all the pinning first then the sewing, then move on to a different type of clothing. Done in no time, and much faster than hand stitching. Would still say do it in batches as regardless of machine or hand it's tedious.
You can also use see through thread (plastic) and just do a big zigzag across almost the width of the name tape, but I think this is a bit itchy so would only when not next to skin directly (eg jumpers, skirts/trousers, coats etc).
Definitely less than a minute per label once you get going, including pinning. The thing is to turn it into a production line, doing the same thing over and over.