Install the library as per the instructions in the zip file. By the way, the package is called Var, not Calvar (my mistake).
Once it's installed you can use
to load the Var package.
Here's a simple example for Poisson's equation.
coordinates(x,y); fields(phi); # coordinates are x and y; variable is phi(x,y)
# f = forcing function
potential:=1/2*(phi[x]^2+phi[y]^2)-f*phi; # potential energy; phi[x] means dphi/dx (parital derivative) etc
# this means that the total potential energy is the integral over the region of "potential"
# the region integral is not defined, just what is integrated, so the above statement implies TotalEnergy = int(potential,region)
# a second derivative would be written like phi[x,x] or phi[x,y] etc
euler:=variation(potential,phi); # euler-lagrange equation
If you have more coordinates, just say coordinates(x,y,z); etc
If you have more variables, use fields(phi1,phi2); etc and then
to get the two E-L equations.