"Formal" means, roughly, "without semantic content". For example, in category theory an arrow is usually a function; if we just say "reverse the arrows", there arises a natural question of "wait, what's the reversal of a function?" Saying "formally reverse the arrows" means that we don't need to answer that question - a formally reversed arrow is just an arrow going backwards, nothing else. Likewise, a "formal sum" of two objects is just the two of them written with a $+$ between them - the formal sum of $a$ and $b$ is "$a+b$", the formal sum of "apple" and "orange" is "apple $+$ orange", and the formal sum of $1$ and $1$ is "$1+1$" - not $2$, just the string "$1 + 1$".
Basically, we use "formal" when we don't want to do anything other than just let an operation make sense - when we want to be able to add elements of a set, for example, without wanting to introduce any new relationships between them. We don't impose any semantics, any "meaning" to "sums" or "reversals" or whatever we're talking about; we just do the operation we want to do, and leave it there.
One characteristic of formal operations is that there's no "other way" to get the same result. For example, the only way to use a formal sum to get "$1 + 1$" is to take the formal sum of $1$ and $1$; you can't sum $2$ and $0$, or $-1$ and $3$, to get the same answer. A formal sum carries absolutely no information beyond what was necessary to build it.
In your example of the opposite category, the arrows are "formally" reversed: This means if you're starting with a concrete category, the morphisms have a clear direction, namely domain to codomain. Reversing the morphisms doesn't suddenly mean that the functions have domain and codomain interchanged; it just means that the category is changed.
– Dustan Levenstein Jun 03 '17 at 23:04