Rusting of an Iron nail at oil water boundary surface Recently at school, I did some experiments on corrosion. Everything mostly went as expected, but the result in one of the test was quite baffling. 

This test had an iron nail in water with some of the nail protruding the surface. The tip of the nail was then covered by oil so that it was completely submerged. It was left as is for 4 weeks. At the end of this time, there was a bit of rusting (as I had expected), but most of it was right at the surface of the water, right where it and the oil meet. Is there any reason why this would be?

Edit
I had a beaker with the nail in it, leaning upright against the wall of the beaker. I put about 200 ml of water in, then about 50–100 ml of oil. The water didn't completely cover it, but the oil did. After 4 weeks, there was rust, mostly situated around (but below) the oil/water border. As for why it was done, I don't know. My lab partner decided to test this. I think it was kind of testing how much it would rust when starved of oxygen.
According to your description, this looks like localized corrosion. Due to differences in the availability of oxygen in the solution, the two half-reactions of the redox process take place on different areas of the surface of the corroding metal. The oxygen reduction reaction preferably takes place on the nail surface in the medium with higher concentration of dissolved $\ce{O2}$ (water).

$$\ce{O2 + 4e- + 2H2O -&gt; 4 OH-}$$

The metal dissolution (oxidation) is then limited to the more oxygen-starved surface area, which is presumably right at the the phase border, where consequently the deposit of corrosion products is formed.

\begin{aligned}
\ce{Fe &amp;-&gt;~ Fe^2+ + 2e-}\\
\ce{Fe^2+ + 2OH- &amp;-&gt;~ Fe(OH)2 \rightleftharpoons FeO + H2O}\\
\end{aligned}

Since these two half-reactions are coupled, the amount of corrosion products formed depends on the oxygen concentration. When there is sufficiently dissolved oxygen available, $\ce{Fe^2+}$ is easily oxidized by to $\ce{Fe^3+}$, and thus the final product, which is commonly called rust, is a mixture of more or less hydrated iron(III) oxides and hydroxides.

$$\ce{Fe^3+ + 3OH- -&gt; Fe(OH)3 \rightleftharpoons FeO(OH) + H2O}$$
$$\ce{2FeO(OH) \rightleftharpoons Fe2O3 + H2O}$$