I have found a formula I want to use. How do I do this in Mathematica?

Its very simple: just retype the formula, name it as a function, define your variables, and you are done.

For example, suppose you have found the formula for the magnitude of a dipole field in Cartesian coordinates

f (x, y) = 
      (1/(Sqrt[(((x + (Subscript[x, 0])))^2) + (y^2)])) - 
        (1/(Sqrt[(((x - (Subscript[y, 0])))^2) + (y^2)]))

The easiest way to input this formula is using the BasicInput palette. 

(1) Open a new notebook or create a new cell in an open one by clicking below the last blue cell bracket.

(2) Open the BasicInput palette by clicking the hyperlink or select BasicInput from File->Palettes.

(3) Click (■/□).

(4) Type 1 and use the the tabulator key to jump to the denominator.

(5) Click (Sqrt[■]).

(6) Type (x+

(7) Click (Subscript[■, □])

(8) Type x, use the tabulator key to jump to the next placeholder, type 0 and press Control-Space to jump out of the subscript.

(9) Type ), select the expression (x + (Subscript[x, 0])) with the mouse, click (■^□) and type 2.

To see how you can type this input using keyboard shortcuts, see the documentation for keyboards shortcuts for either Microsoft Windows,  Macintosh, or X.

After you input the rest of the formula in a similar manner, you can visualize it immediately using plotting functions. Just plug in values for (Subscript[x, 0]) and (Subscript[y, 0]).

Plot3D[
        (1/(Sqrt[(((x + 1))^2) + (y^2)])) - 
          (1/(Sqrt[(((x - 1))^2) + (y^2)])), {x, -2, 2}, {y, -2, 2}, 
        PlotPoints -> 40];

To use a formula more generally, you can easily represent it as a Mathematica function.  Here is the textbook formula for the electric field of a number of radial wires carrying opposing currents organized on a unit circle.

\(TraditionalForm\`∑\+\(i = 1\)\%n\((\(-1\))\)\^i\/\@\(\((x - cos(\(2\ π\ i\)\/n))\)\^2 + \((y - sin(\(2\ π\ i\)\/n))\)\^2\)\)

Here is the same formular written as a Mathematica function. Note that function names are upper case by convention, function arguments are enclosed in square brackets, and the independent variable is followed by an underscore in the function definition. All the other typeset elements were input using the BasicInput palette.

Multipole[
        n_] := (∑_(i = 1)^n)((((-1))^i)/(Sqrt[(((x - Cos[((2 π i)/n)]))^2) + (((y - Sin[((2 π i)/n)]))^2)]))

ContourPlot[Evaluate[Multipole[7]], {x, -2, 2}, {y, -2, 2}, 
        PlotPoints -> 40, Contours -> 30];