A witness to a document is stating that the individual who signed the document looked like they were of sound mind and it appeared that they were acting of their own volition and not under any influence of another person or substance.
Witnesses to a document may have known your ancestor.
Witnesses to a document may have been related to your ancestor.
Witnesses may have been just another warm body in the Justice of the Peace's office at the same time as your ancestor.
Witnesses do not have to be related to your ancestor and they don't have to be "friends" with your ancestor. They could be, but they do not have to be. Keep that in mind.