This support page may be helpful with pairing and use of the Pencil with your iPad:
Connect Apple Pencil with your iPad - Apple Support
If you continue to experience difficulties, here is one of the better troubleshooting guides:
https://appletoolbox.com/apple-pencil-not-working-heres-our-troubleshooting-guide/
Be aware that if your Pencil has been set-aside for an extended period, unused and uncharged, the Pencil battery may now be irretrievably damaged through deep discharge. In common with all Li-ion batteries, they must always have some level of charge.
It is essential that if you have an Apple Pencil that you charge it regularly - whether used or not - so as to protect the battery from deep-discharge. Do not allow a pencil to remain in low-charge state for any period of time - as the internal battery will fail, rendering the Pencil useless. Setting aside an unused Pencil, for extended periods, is a recipe for premature death of the Pencil battery. A second generation Pencil should be docked with the host iPad whenever it is not being actively used, as this will optimally maintain the Pencil battery.
If the Pencil Battery has failed, the only remedy is to replace the Pencil. If the battery has failed and your pencil is within its one-year warranty, you should look to having it replaced by your retailer or at an Apple Store.
Some reports suggest that gentle warming of the Pencil (such as placing the pencil on a hot water radiator) prior to attempting charging can sometimes resurrect a Pencil battery. Whilst nobody should advocate external heating of any Li-ion battery (this being potentially very dangerous), gentle indirect warming of a tiny battery is unlikely to lead to catastrophic failure.