A guarantee is a threat of war against any country which declares war on a protected country.
Sending a guarantee is a diplomatic action. There are no special preconditions for sending a guarantee, except that there must be no existing guarantee. Normal preconditions for diplomatic actions apply: the country must have at least one diplomat and enough money.
Once sent, a guarantee creates a diplomatic agreement (called the same thing, a guarantee), which lasts for 20 years. There is no way to cancel a gaurantee once sent.