While there is plenty of good advice in the other answers, I feel I have some more to offer that is a little less spontaneous. Sleeping on a plane is a learned skill and it is improved by planning, preparation, and practice. You can change the likelihood of sleep from nearly nil to nearly guaranteed, but not if the first time you start to think about it is as the plane starts to taxi.
First, the booking. Generally you have some choice here. Should you leave early in the morning, or late at night? At 4pm, ensuring you'll be hungry after a few hours in the air, or at 8pm, when you're more likely to show up having eaten enough to last you through the night? If it's a 7 hour flight and you need to stay awake for 2 hours to get food, you're not getting more than 5 hours of sleep. Pick a flight that either won't require you to sleep much, or that lets you organize the rest of your day to maximize the time you have for sleeping. Also think about whether a glass of wine would help - it's much easier to get one (bought in the airport, say) at 7pm than at 7am. Here is also where you settle window/aisle (I like window because it gives me a wall to lean on and a few more inches of space from my seat to the wall), consider paying for more legroom in a premium seat for $100 or so more, and the like.
Second, the packing. NEVER count on the airline for pillows, blankets etc. Sometimes they don't get them. Sometimes they can't give you one until the seatbelt sign is off. Airline pillows are small and weird and most annoyingly, they're slippery and they fall between your seat and the wall. Bring your own. A bed pillow from home, one of those C-shaped things (solid or inflatable), something. I like an inflatable one with a VERY fuzzy cover and a little pocket for eyeshades:
I don't decline blankets or pillows from the airplane though - they are handy for padding the armrest so I can lean against it or over it without the edge digging into me.
Continuing with packing, I bring my own blanket in the form of a pashmina which folds very small but unfolds enough to cover all of me (6' x 2' I suppose.) I generally use separate blankets for my top and bottom half, to help the crew see that my seatbelt is fastened and to let me move more freely. If the airline doesn't give out blankets I'll use a coat on my legs. My pillow and blanket are familiar and comfortable, they smell right, and I never worry if they're clean. The eyeshade makes a huge difference also, both in keeping out the light and in telling people you are sleeping and don't want a drink, a newspaper, dinner, duty free, etc. And for me, the sensation of the eyeshade on my face reminds me I am supposed to be sleeping. Noise cancelling headphones and a playlist of relaxing and enjoyable music are also on the packing list. These are better than earlugs in my experience, though I always have a few earplugs in the bag just in case. Over-the-ear can be uncomfortable to lie on, so I use earbuds. Plug into the entertainment system when you board, put them in, go to sleep. If you wake later, switch to your playlist and put your seat back. When you have to put your seat up, switch back to their system. I also choose shoes I can slip off and slip back on rather than ones that need tying. Your laceups can be in your checked luggage.
So you chose the right flight and seat, you packed the right stuff and you're at the airport. Eat, drink, go to the bathroom. These are all good ways to pass the time while you're waiting to board. Also bring an empty water bottle with you that you can fill after security, or buy water in the airport. That way if you wake up thirsty you can immediately fix that and go back to sleep.
Now on the plane, all you need to do is sleep. Don't put the pillow around your neck. You have so little recline, you don't need to prop your head up. Put it between the side of your head and the wall. Put your ear in the centre hole so it doesn't get squished. Coat over legs, blanket over shoulder and chest. Snuggled up warm and cosy, listening to something you like, with a water bottle in easy reach and a clear "leave me alone" sign on your eyes, you will sleep. You just will. And trust me, it is so much better than a book or that movie you never got around to watching in theatres. You will get better at it every time.
If you wake up, especially if you're uncomfortable, change your position. Loosen your seatbelt as much as you can and sort of turn on your side. Or move your feet from on top of the carryon you stuffed under the seat in front of you, to next to it. Adjust your blankets a little. Move your pillow more under your chin. Your approach should be that you will do what you need to do to go back to sleep, not "oh well I tried but I woke up." Don't worry about what time it is. You won't miss your stop. If you wake up again, then try a third position. You'll find something comfortable eventually. If you feel anxious when you wake up, especially if you're getting caught up in the "oh noes now I will only get three hours sleep, I am ruining my trip" then try switching from your playlist to some guided relaxations and meditations. Many airlines have them in the inflight system, or you can bring your own. It's as good as sleeping in terms of refreshing your brain and body, and could (usually does) lead to falling asleep too.
Learn from each flight and adjust what you bring and do. You will become one of those people who finds it "effortless" and easy to sleep on planes. It's not that easy and then again, it is.