Two weeks is generally considered to be an appropriate notice of resignation period. However, there might be extreme circumstances that would cause someone to resign immediately, without notice. On the other hand, if the person resigning is in an important position, they want to offer a longer period of notice, perhaps 30 days.
Many employers will accept a resignation with two weeks notice and simply have the employee leave immediately.