Now how do quotes, pips, spreads, leverage and lots all fit together to trade in the forex market.

A quick recap to refresh our memory before explaining a transaction from begin to end.
Quotes: Value of a base currency versus another currency
EUR/USD 1.4224/26
Bid/Sell: The price at which a currency can be sold(first price)
Offer/Buy: The price at which a currency can be bought(last price)
Pips: A single point in the forex quote
Spreads: The difference between the bid/sell and offer/buy of a forex quote.
EUR/USD 1.4224/26 = 2 pips spread
Leverage: The multiplier of your capital in the forex market
50:1 ; 100:1 ; 400:1
Margin: The amount of capital required for a purchase
If you start with $5000 in your forex account.
You want to purchase 1 lot of EUR/USD in the forex market.
The current forex quote quote is 1.4224/26.
This will cost you €100 000 or $142 260.
If your broker offers you 100:1 leverage you will need 1% or $1422-60. This will leave you with $3577-40 available in your forex account. The amount of $1422-60 will be held as a margin.
The forex quote rises 50 pips to 1.4274/76 and you decide to sell. Your selling price will be 1.4274 and this will give you a profit of 48 pips or $480 giving you a return of 34%. This is quite a remarkable return considering you that a 50 pip move normally occurs in a few hours and sometimes in just a few minutes. After this you will have $5480-00 in your account.
To calculate your profit: If the forex quote ends in USD eg. EUR/USD, GBP/USD, one standard lot will give you $10 per pip and on a mini lot 1$ per pip.
If the quote ends on a different currency the end of the quote will equal your dollar return eg. USD/CHF. You will earn SFr10 on a standard lot. You will have to divide 10 by the current quote to see your dollar return. eg. For USD/CHF 1.1324/26 1 pip will equal 10 divided by 1.13 = $8.85 per pip.
In addition to earning a straight up profit interest is also earned on any position bought/long where the first currency has a higher interest rate or sold/short on a forex quote where the last symbol has a higher interest rate. The difference between the interest rates multipied by the leverage is earned. If the USD interest rate is 4% and the JPY is 0.5% and you bought USD/JPY the difference will be earned at a rate of 350%((4-0.5)x100) per annum on your margin as long as the position is open. Of course if the currencies were standing still this would work perfectely.