Without going into a full explanation on why the method works, what you typically do is: if your initial condition is written in the form u(x,x)=g(x), then your initial conditions for your characteristics become x(0)=x_0\\<br />
y(0)=x_0\\<br />
u(0)=g(x_0). Sometimes the initial condition might look different. For example, if you had the initial condition u(5,y)=g(y), then your initial condition would bex(0)=5\\<br />
y(0)=y_0\\<br />
u(0)=g(y_0). Essentially, you parameterize the initial curve. In the case where you have n independent variables, so u=u(x_1,\cdots,x_n), you would parameterize the initial curve using at most n-1 parameters. Here, we had n=2, and I denoted the parameter by x_0. We had the initial curve u(x,x)=x, so the "x" coordinate is represented by x_0, the "y" coordinate is also represented by x_0, as is the "u" coordinate. This curve is actually just a line in \mathbb{R}^3; we can write it as \{(x,y,u)\in\mathbb{R}^3 : x=y=u\}.
For example, we could look at an initial curve in a system with three independent variables, but now the curve would (in general) be represented with up to two parameters. eg: if we had u(x,x,z)=3z-\log(x^2), the we could parameterize this by x_0,z_0 and we would getx(0)=x_0\\<br />
y(0)=x_0\\<br />
z(0)=z_0\\<br />
u(0)=3z_0-\log(x_0^2). Do you understand the procedure?
If you want to understand how/why this works, then any decent PDE textbook with an emphasis on explicitly solving PDEs should cover this. There are also numerous resources online.