I removed old paper from the wall and want to paint it new . Before doing it I guess I should sand the whole wall so that it's smoother and for that I'll use a dry-wall sander. The question is which sand paper should I use and when to stop? How smooth should the end result be?
Given that you have wet scraped as much as you can of the old wallpaper off the wall (if you haven't this is the first step), I am guessing that you are left with residue and paste and maybe a little bit of "cloth".
I suggest priming the walls with a PVA primer. After 3-4 days you can hit it with a 300 grit sandpaper. You will have a lot of spots where the paste and residue are popped out a little. Much much easier to get to these after primer. If your walls were really bad you may need a quick coat of primer again but usually you can just paint right after (sand and then wipe walls with damp cloth).
The answer depends partially on the paint being used and how many coats will be used.
Instead of sanding, you could mud it if the remaining surface is in good enough condition, though getting the applied mud smooth and fine can be challenging.
You could simply spray texture over the surface. A "hopper" gun is readily rented from many home improvement and contractor supply stores. Or, if the wall isn't particularly big, there are small spray cans of texture.
Depending on how much the particle board was compromised leaves you where you stand. It isnt rare that the board need be replaced due to wallpaper removal. Sometimes it is easier to just replace the wallboard or even put new boards over the old using a thinner board. The key word is easier, good luck.