You need to make sure there are no active definitions on the constituent parameters. You can do this with ClearAll as E.Doroskevic proposes, though I imagine you will not want to clear all Global` definitions.
You can Block the Symbols in use as described in Scoping in assigning a derivative. To make this convenient I propose using the function localSet which I wrote for How to make a function like Set, but with a Block construct for the pattern names.
xi = "fail!"; y = "bad!"; localSet[c[theta_, xi_], theta*xi + theta^xi^2] localSet[xbar[theta_, xi_], theta/xi + xi^2 + theta^3] localSet[f[x_, y_, theta_, xi_], x*y*c[theta, xi]*theta*xi + xbar[theta, xi]] ?f
Global`f
f[x_, y_, theta_, xi_] = theta^3 + theta/xi + xi^2 + theta x xi (theta^xi^2 + theta xi) y
Observe that the definition is correct despite the definitions on xi and y.
Remove[c, xbar, f]before the function definitions. $\endgroup$