During combat, you can cast instants before attacks are declared, after attacks are declared, before blockers are declared and after blockers are declared. After that, you have to wait until combat damage is calculated to cast another spell or activate another ability.