These support pages may be helpful with pairing and use of the Pencil with your iPad:
Connect Apple Pencil with your iPad - Apple Support
Charge your Apple Pencil and check the battery - Apple Support
Be aware that if your Pencil has been set-aside for an extended period, unused and uncharged, the Pencil battery may have been damaged through deep discharge. In common with all Li-ion batteries, they must always have some level of charge.
The tiny internal Li-ion battery is susceptible to permanent/irreversible damage through being left discharged for long periods. Even some “new” pencils can exhibit signs of failure out-of-the-box if they are “old stock”.
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 and premature death of the Pencil. 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.
It is generally recommended that an Apple Pencil should be kept docked with the host iPad when not in active use - as this ensures that the tiny internal battery is kept optimally charged. Charging of the Pencil only occur when the battery requires charge from the iPad, optimal charge being entirely automatic.
Keeping the Pencil separated from the iPad when unused risks allowing its battery to discharge; if allowed to remain in this state, the battery will suffer irreparable damage. When the battery fails, the only remedy is to replace the entire Pencil; the battery is not a serviceable item. 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.
Gentle warming of the Pencil (such as placing on a hot water radiator), prior to attempting charging of the Pencil, can sometimes resurrect a dead Pencil battery.