Binding is a word used to describe giving a value to a variable. It normally occurs during application of a Prolog rule, or an attempt to satisfy the goals in a Prolog query.

Suppose that the Prolog database contains just the single fact likes(mary, pizza). and that there is a query:

?- likes(mary, What).

Prolog will search the (tiny) database, find that the query can be satisfies if What = pizza, do it will bind What to pizza and report success:

?- likes(mary, What).
What = pizza ;

Now suppose that there is a rule and facts in Prolog's database:

teaches(Teacher, Student):-
    lectures(Teacher, Subject), studies(Student, Subject).
lectures(codd, databases).
studies(fiona, databases).
studies(fred, databases).

and that the user issues the query:

?- teaches(codd, Who).

The Prolog interpreter first matches the head of the rule with the query, and so binds Teacher to codd. It then finds a fact that indicates a subject that Codd lectures - namely lectures(codd, databases). At this point, the variable Subject is bound to databases (Subject = databases). In other words, Subject, perhaps temporarily, has the value databases. Then Prolog tries to satisfy the second goal studies(Student, Subject) with Subject = databases, i.e. it tries to satisfy studies(Student, databases). When it finds the solution, studies(fiona, databases) it will bind Subject to fiona, and report the solution:

?- teaches(codd, Who).
Who = fiona

Notice that the binding Subject = databases was made in solving the query, but it is not reported, as it is not explicitly part of the query.

Then, if the user types ";", Prolog will backtrack and undo the binding Student = fiona and look for another value for Subject that satisfies studies(Student, databases), and find as Student = fred. However, while binding (and unbinding) is involved in this step, it is properly treated under backtracking.