Great opening lines can also introduce a character in an interesting way. Such as 'John woke up with a strange mark on his hand, and he had no memory of how it got there.' This immediately makes the reader interested in John and his situation. They want to know more about who he is and what the mark means.
Great opening lines often introduce an element of mystery or intrigue. For example, in 'The Hitchhiker's Guide to the Galaxy' with 'Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the Galaxy lies a small unregarded yellow sun.' It makes you wonder about this strange, uncharted place.
Some opening lines use shock value. Like 'All this happened, more or less.' from Kurt Vonnegut's 'Slaughterhouse - Five'. It's a rather nonchalant way to start a story that is about the horrors of war, and this contrast between the casual tone and the serious subject matter grabs the reader's attention.
Another way is by setting an unusual scene. In 'Slaughterhouse - Five' by Kurt Vonnegut, the opening 'All this happened, more or less.' gives a sense of ambiguity right away. It makes the reader question what 'this' is and how it happened'more or less'. It's a unique way to start a story that is full of time - jumps and surreal elements.
By creating mystery. For instance, a first line that poses a question or presents a strange situation makes the reader want to find out more.
Some best opening lines set the mood. Take 'The Road' by Cormac McCarthy: 'When he woke in the woods in the dark and the cold of the night he'd reach out to touch the child sleeping beside him.' This line gives a feeling of desolation and a sense of the bond between the characters from the start. It makes the reader want to know more about these characters and their situation.
Well, they often create intrigue. For example, the opening of 'The Great Gatsby' - 'In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since. "Whenever you feel like criticizing any one," he told me, "just remember that all the people in this world haven't had the advantages that you've had."' This makes you curious about what that advice will lead to and what kind of story the narrator has to tell. It's like a hook that pulls you in.
By creating a sense of mystery. For example, 'The old clock in the attic started ticking again, after years of silence.' This makes the reader curious about why it started ticking.
Well, they often introduce a mysterious or alluring character right away. For example, 'She had eyes that held a thousand secrets, and he was determined to unlock every one.' It makes you curious about the woman and the man's intentions.
They often start with something unexpected. For example, in 'Charlie and the Chocolate Factory', 'These two very old people are the father and mother of Mr. Bucket.' It makes you wonder who Mr. Bucket is and what the story will be about.
They often start with a sense of mystery. For instance, 'There was a strange package on my doorstep when I got home. No name, no address.' This makes the reader curious about what the package is and what it means for the story.