"A signature (from Latin: signare, "to sign") is a handwritten (and often stylized) depiction of someone's name, nickname, or even a simple "X" or other mark that a person writes on documents as a proof of identity and intent" (Wikipedia). Our ancestors probably signed a number of documents in their lifetime, but from a genealogical point of view the most well-known are their will (if they made one); and that both the bride and groom signed the entry in the marriage register when they got married.
Some people signed with an "X" and this is usually taken to mean that the person couldn't write their name. However it is possible that there is another explanation, particularly in the case of the bride and the theory has been put forward that if her husband couldn't write his name, then she may have followed suit in order to avoid appearing "better" than him. The Elementary Education Act of 1880 insisted on compulsory education from 5-10 years and was followed by other legislation to improve attendance, payment of fees and to increase the number of years in education. Prior to that education was patchy and depended on where you lived, what gender you were and whether your parents could afford both to pay and not have you doing other work.
It is also worth mentioning that witnesses also signed the marriage register. They could be professional witnesses - one of my ancestors was a parish clerk and undoubtably earned a little extra by signing as a witness for marriages. Mostly the witnesses would be family members and it can be useful to work out who they are as even people with different surnames can be married sisters or step-siblings. My wife recently managed to tie three generations together just by working out who an apparently unrelated witness was - but that's another story...