If they offer you the job during the interview and give you a specific salary number, say you'd need to take a day to review the formal offer and have them email it to you. Try not to react to the # if it's higher than you expected! Don't accept on the spot.
If they offer you the position via email or phone after the interview and you're excited about the number, again ask them to send over a formal offer as well as include any benefits information. Say you need to review the entire compensation package, which may include benefits or time off.
Even if the pay is fair, always ask for slightly more.
If they offer you the position and it's much less than you were hoping to make, say "oh I was actually hoping to be around $____/year for my next role, which seems standard for my position and location - are you able to speak to management and put together a higher offer?" Arm yourself with information about your position and expected salary by looking at websites like glassdoor and salary.com.
If it's an hourly position and they offer you an amount you're okay with, ask for $1-2 dollars more per hour, at least, just because. They will most likely give you slightly more than their original offer, but worst case scenario they say no! No one is going to withdraw their offer because you countered.