One who divorces must say when he gives her the divorce document, "Behold, this is your divorce document", or something similar. If he puts it in her hand and says nothing, the divorce document is invalid. Rama: Ideally he should say to her "Behold this is your divorce document (and I am accepting your divorce document) (Mordechai in chapter Hamgaresh and Bet Yosef in the name of HaKuntres) and behold you are divorced from me, and behold you are permitted [to remarry] any other person (ibid and Tur), from now on (Bet Yosef in the name of the Y"A)." We have the custom that the husband folds the divorce document like a letter, and gives it to her, so that she can grasp the entirety of it in her hand when he gives it to her. The husband must understand what he is saying to her. And so, anything he says to her, they must explain to him wgat it means (all in the Seder Gittin).
When does this apply? When he had not discussed with her the process of her divorce document. But if he did discuss with her the process of her divorce document, and he takes the divorce document and puts it in her hand and says nothing, indeed that is a [valid] divorce document.
When he gives her the divorce document, he should say to her, "Behold you are divorced from me with this divorce document and permitted to [remarry] any other," or "Behold you are sent away from me." If his messenger gives it to her, he says, "Behold you are divorced from so-and-so with this divorce document, and behold you are permitted to [remarry] any other." If he says [instead], "I am not your spouse," or "I am not your husband," some say that is not a divorce, even if he discussed with her the process of the divorce, as it says (Deuteronomy 24:1, Deuteronomy 24:3) "And he sent her away", and not that he sent himself away. And some say that if he discussed the process of divorce with her, it is a divorce of doubtful [legality].
[If] he says to her, "Behold, you're on your own," that is a divorce. But if he says to her, "Behold, you are free," [it is as if] he said nothing.
It needs to be given to her through the framework of divorce, but if it was given to her through the framework of debt documents, she is not divorced, unless he says to her afterward, "Behold this is your divorce document," or he informed the witnesses so beforehand. Rama: And as long as the woman is informed that it is divorcing her, or the witnesses tell her afterward (so says Tosafot Perek haZorek).
If someone else in the city has the same name as him, and the wives have the same names, he cannot divorce her unless that other person is present Rama: Even if the divorce document goes out from one of their hands [straight to his wife, so there is no doubt who it is meant for], she is not divorced, until proof is brought that she was divorced while the other person was present, or the witnesses of the transfer are brought that she is indeed his wife (R"Y C"H). Some say that if the names of the divorcers are the same, even though the names of the wives are not, nevertheless they write in a sign of [the real divorcer, i.e. he has black hair], or his nickname (Seder Gittin), or that one is a kohen and the other is not a kohen (Piskei Mahari Siman 6). And so they have a custom to give the divorce document in public, so that if there are two people in the city whose names are the same, they will be present for the divorce documen (Chiddushei Agudah Perek Kol HaGet).
One may not divorce on the Sabbath. And if it is an emergency [lit. "the hour requires it"], such as a shechiv mera [a man on his death bed] who is being taken over by illness and wants to divorce her so that she would not be tied to a yibum [levirate marriage], if he has the get [bill of divorce] in his possession, he can cause her to acquire it [his possessions], and she will acquire the get inside it. And if it impossible [for this acquisition to occur] without [an official ] moving [of the possession it is in], for example the get is not sitting in possession, they can put it in his hand and it can be given to her. Rem"a: Some say that today, now that the Oral Torah is written, it is permitted to carry a get on the Sabbath (Mordechai the beginning of HaZorek, and the Smag), and he can give it to her in any fashion.