When should I accept an offer?

Companies usually give about 10 working days as a deadline to make a decision. If you need to take this time to make your decision, you should do so. If however, you know before then that you intend to accept the position, by all means, call them up and do so. The company will be delighted that you have responded so promptly, and it demonstrates that you are able to make decisions quickly and decisively.

When and how should I resign?

Do not resign until you have received the WRITTEN offer from your new company, and have returned it to them with the appropriate signatures. You may resign anytime after that.

You should resign in writing, and should give two weeks notice. More than two weeks is awkward; less that two weeks is un-professional.