A formal fallacy is where the basic logical structure of an arguement is flawed. For instance, the statement :

All (p) is (r)
All (q) is (r)
--------------
All (p) is (q)

You can verbalise this as :

All penguins are black and white
All old tv shows are black and white
------------------------------------
All penguins are old tv shows

A more common but less obvious example is inferring the consequence :

If (p) then (q)
But (p)
------------
Therefore (q)

For example:

If science can’t explain everything then God must exist
But science doesn’t explain everything
---------------------------------------------
Therefore God exists

See also : Informal fallacy, syllogism