It needs to be signed by a person with the legal capacity to enter into a contract.
I.e Not a minor, not drunk.. not mentally disabled ... they have to do understand the effect of what they're doing.
It's also a good idea to take a copy of their photo ID to ensure they sign as the person that they say they are (at least).
Sometimes a person might sign 'Persons name on behalf of Company X', which is most common when a company is yet to be officially formed so prior to it being incorporated.
And yes as someone said you need to be authorized,
if the person isn't authorized then a bunch of sub issues in the law of agency arises.
So there's a whole list of issues there whether they had express, implied or ostensible authority to do the act or whether the company later ratified the contract express or impliedly... but save that for the unlikely event of lawyers ;)