How to precisely define "… is not expressible in first order logic"? Terence Tao said in a blog post at https://terrytao.wordpress.com/2007/08/27/printer-friendly-css-and-nonfirstorderizability/#comment-474656:

I can’t quite show that (*) is not expressible in first-order logic. 

And (*) is this statement:

For every x and x’, there exists a y depending only on x and a y’ depending only on x’ such that Q(x,x’,y,y’) is true (*)

How can one formally define/express things like “(*) is not expressible in first-order logic”?
 A: EDIT: Below I talk about proving things about first-order logic. This is a bit weird on the face of it; there's a couple ways to interpret it:

*

*Formalist: We work inside the formal, first-order theory ZFC. Each of the statements below can be translated in a natural way to a sentence in the language of ZFC, and proved from the axioms of ZFC.


*Realist: Proofs can take place in the metatheory, and these do.
Regardless, I think it's best to try to understand the purely mathematical phenomenon that's happening here, before trying to cast it in a foundationally-clear manner; the latter task is much easier once the former has been accomplished.

There are theorems about what first-order logic can and cannot do.
The key ones are the compactness and Lowenheim-Skolem theorems. Let $\Gamma$ be a set of first-order sentences, and $\kappa$ an infinite cardinal. Then:

Compactness: If every finite subset of $\Gamma$ has a model, then $\Gamma$ has a model.
Lowenheim-Skolem: If $\Gamma$ has cardinality $\le \kappa$ and has a model, then it has a model of cardinality at most $\kappa$.

(Technically the version of Lowenheim-Skolem that I've stated is the "Downward" direction only; this is because the "Upward" direction - that if $\Gamma$ has a model of size $\kappa\ge\vert \Gamma\vert$, then $\Gamma$ has a model of size $\lambda$ whenever $\lambda>\kappa$ - is really just Compactness + the Downward direction.)
There are other theorems providing limitations on first-order logic, but these are the most ubiquitous ones.

These theorems let us prove that certain things can't be done in a first-order way. Here are some examples:
The following is an easy consequence of the compactness theorem:

There is no set of first-order sentences $\varphi$ in the language of graphs, such that for all graphs $M$, $M\models\varphi$ iff $M$ is connected.

In pretty much exactly the same way, we also have:

There is no set of first-order sentences $\psi$ in the language of groups such that $G\models \varphi$ iff $G$ is a torsion group.

The following example is proved via Lowenheim-Skolem:

There is no set of first-order sentences $\theta$ in the language of rings such that $R\models \theta$ iff $R$ is an uncountable ring.


Having given some precise examples, let me now point out an important ambiguity:
Saying "$P$ is not expressible in first-order logic" is slightly ambiguous; it could mean either that there is no single first-order sentence true in exactly the structures with property $P$, or it could mean the stronger statement that there is no set of first-order sentences true in exactly the structures with property $P$.
For example, in the empty language, the property of being infinite is not expressible by a single first-order sentence, but is expressible by a set of them: if we let $\varphi_n$ be the sentence $$\forall x_1\forall x_2...\forall x_n\exists y(\bigwedge_{1\le i\le n} y\not=x_i),$$ then $A\models \{\varphi_n: n\in\mathbb{N}\}$ iff $A$ is infinite.
However, which version is meant is usually clear from context (and if it's not, that's bad writing).

Interestingly, any logic stronger than first-order logic - second-order logic, infinitary logic, stationary logic, etc. - must fail either the Compactness or Lowenheim-Skolem theorems - this is Lindstrom's theorem. However, the Compactness and Lowenheim-Skolem properties do have analogous versions which sometimes hold of stronger logics; e.g. for fragments of the infinitary logic $\mathcal{L}_{\omega_1\omega}$, we have the Barwise Compactness Theorem. Especially in the context of $\mathcal{L}_{\omega_1^{CK}\omega}$ - the smallest "nice" fragment of infinitary logic which is stronger than first-order logic - Barwise compactness has been incredibly useful in proving results relevant to classical computability theory.
