The first Star Trek episode was called 'The Cage.' It starred
Jeffrey Hunter as Capt. Christopher Pike. The pilot was
rejected.
The episode was created in 1966, but did not air until October
1988. Parts of this episode were aired in the original series as
flashbacks in the episode 'The Menagerie', which aired in November
1966.
The series was picked up with William Shatner playing the role
of Capt. James T. Kirk.
The first episode of what is now referred to as Star Trek TOS
(the orignal series) that aired is 'The Man Trap.' It was actually
the 5th episode produced.
There was a pilot for Star Trek TOS called 'Where No Man Has
Gone Before.' This episode was the first produced, but the 3rd to
air as part of the first season of Star Trek in 1966.