Cortana is an Artificial Intelligence from the Halo universe. AIs were used on large spacecraft to perform advanced data analysis (like is necessary for navigating hyperspace) and help the ship's Captain.
She was created based on the brain of Dr. Halsey, the doctor responsible for the Spartan soldier program that created Halo's main hero: Master Chief John 117.