How to calculate pressure distribution over an airfoil from its coordinates?
What helped me was the book "Theoretical and Computational Aerodynamics" by Jack Moran (ISBN 0-471-87491-4). That was 30 years ago, but the physics haven't changed since then. And it is still available.

An online source would not go deep enough to cover all what you need. My advice is to get the book and work through the exercises. It worked for me, and if even I could code a 2D potential code after having read this book, you should have no problems.

There is one trick: At one point you will end up with n equations for n+1 unknowns. Bummer! What you need to do is to prescribe flow direction at the trailing edge, and then you will have n+1 matching conditions for those n+1 unknowns, n being the number of panels you divide the airfoil surface into. Google "Kutta condition" for an explanation.



EDIT

Now you have quite a different question:


  by CFD i meant RANS. how does it compare to RANS methods in term of stall prediction and pressure distribution


@toshiba: The comparison is like between a Volkswagen Beetle and a Mercedes. A potential code is simple, robust and gets you there, like the Beetle. Pressure distribution is good until separation starts. Compressibility can be modelled until locally the speed of sound is reached. Stall prediction is a bit tricky, but with a bit of experience and an added boundary layer calculation you will get good results.

RANS is a simplified Navier-Stokes algorithm which is used for modelling turbulent flows. Like the Mercedes, it needs much more effort to code and run (and computing power - it requires a mesh where the potential code only needs panels on the airfoil surface) but also produces better predictions if the mesh is laid out well. Drag and stall approximation is included while potential flow needs some extra effort for boundary layer modelling. A Navier-Stokes code can also be used for transsonic flow.

If you want to build your own, assume you get the parts only and have to assemble the cars. No plans included. The VW Beetle heap is much smaller and you can figure out quite quickly how it fits together (did that once with a Beetle engine that someone else had disassembled and left behind). When you are finished, the car will run and require little maintenance.

With the Mercedes, there are many more parts, more complicated looking and requiring special tooling. It takes much longer to get assembled and in the end you will have some parts left over and others in the wrong place if nobody experienced guides you along. Maybe the car runs, but it will break down quickly unless you put much effort into maintaining it.

In other words: Start with a potential code. MUCH easier.