Please tell how to sleep well.

Be consistent. Here are some tips - 1) turn off tv/computer one hour before wanting to sleep. 2) quiet music is ok. 3) no caffeine for 8 hours prior to going to sleep. 4) regular exercise (even in the evening - some people sleep better when they exercise later). 5) eat a smaller dinner. 6) go to bed at the same time, every night. 7) read quietly. You may need a sleeping pill, if so, see your doc.
Can't sleep. Talk to your doctor about this to see if you need assessed for secondary insomnia (insomnia due to other organic or psychological factors) which can be treated. Meanwhile you can try the sleep hygiene techniques.
More Sleep Hygiene. In addition to dr. Cunnar's recommendations: get up the same time each day. Make a regular, relaxing bedtime routine. Relaxing rituals prior to bedtime may include a warm bath or shower, aroma therapy, reading, or listening to gentle music. Sleep in a dark, quiet, cool room on comfortable mattress & pillow. Use the bedroom only for sleep & sex. No napping. Consider chamomile tea before bed.
Sleep. Sleep is driven by circadian and homeostatic drives. Identify your daily pattern by maintaining a sleep diary for 2 weeks or so, read about sleep hygiene, you can google sleep diary and sleep hygiene etc sometimes melatonin and light therapy are used if you have delayed sleep phase or advanced sleep phase syndrome.