Socks Connected To Pants?

Yes. During the 15th century pants men wore called "breeches" were made pretty short. So, they started making hose which men connected to their pants which formed tights. They were made of silk and velvet. They also wore a different color hose on each leg. How odd, don't you think?
Picture
Picture
These photos are of 15th century paintings that display the style of dress during that time period, leggings specifically.

Did They Knit Every Sock By Hand?

They used to. In Scotland and France in the 15th Century William Lee invented the very first knitting machine. His wife was so into knitting that she never looked up from it, so he thought creating this machine would free up some of her time. Sadly, Queen Elizabeth denied his machine. She did not like the feel of the knitted socks because she was used to fancy socks made from silk imported from Spain. Despite that, many of his early machine designs can be seen in modern day knitting machinery.
Picture
A photo of the first knitting machine.