(covers information from several alternate timelines)
This page contains information regarding Star Trek: Discovery, and thus may contain spoilers.
The position of acting first officer was bestowed upon an officer or another individual aboard a starship when the ship's regular first officer was unable to fulfill his duties or until a permanent replacement had been found.
In an alternate 2258, created by the Romulan Nero, Captain Christopher Pike of the USS Enterprise appointed Commander Spock acting captain and Lieutenant James T. Kirk as first officer when Pike left the ship to confront Nero. Subsequently, Kirk proved that Spock was unable to perform his duties and then Kirk himself was made acting captain. After everything was over, Kirk was promoted to the rank of captain and given regular command of the ship. (Star Trek)