A variable in Prolog is a string of letters, digits, and underscores (_) beginning either with a capital letter or with an underscore. Examples:
X, Sister, _, _thing, _y47, First_name, Z2
The variable _ is used as a "don't-care" variable, when we don't mind what value the variable has. For example:
is_a_parent(X) :- father_of(X, _).
is_a_parent(X) :- mother_of(X, _).

That is, X is a parent if they are a father or a mother, but we don't need to know who they are the father or mother of, to establish that they are a parent.

Variables are used in more than one way: