You have provided no detail of your iPad model or version of Apple Pencil.
Starting at the beginning... compatibility. Here is the full list; ensure that you have an iPad that is compatible with the Apple Pencil - and the Pencil that you have:
Apple Pencil (2nd generation)
You can use Apple Pencil (2nd generation) with these iPad models:
- iPad Air (4th generation)
- iPad Pro 12.9-inch (3rd generation) and later
- iPad Pro 11-inch (1st generation) and later
Apple Pencil (1st generation)
You can use Apple Pencil (1st generation) with these iPad models:
- iPad (8th generation)
- iPad mini (5th generation)
- iPad (7th generation)
- iPad (6th generation)
- iPad Air (3rd generation)
- iPad Pro 12.9-inch (1st or 2nd generation)
- iPad Pro 10.5-inch
- iPad Pro 9.7-inch
Not sure which iPad you have? Identify your iPad model.
You should note that the two generations of Apple Pencil are not interchangeable; they only work with specific models of iPad.
Next, Apple’s guide for pairing and using the Apple Pencil:
Connect Apple Pencil with your iPad - Apple Support
If still having difficulties, here is one of the better troubleshooting guides for the Apple Pencil that may be helpful in working through common issues. This is applicable to all models of iPad and Apple Pencil:
https://appletoolbox.com/apple-pencil-not-working-heres-our-troubleshooting-guide/
If your Pencil is compatible with your iPad, and you have checked through potential issues using the linked troubleshooting guide, then your Apple Pencil may be displaying symptoms of a dead battery - that will not accept or hold any charge.
Assuming that you do not have any other iPad charging issues - connect the Pencil to the iPad. For compatible models of iPad with a Lightning port, ensure that the Lightning Port of your iPad is free from debris; for iPad4 and 2018/2020 models of iPad Pro, magnetically dock the Pencil to the corresponding charging pad on the edge of the iPad.
Whilst the Pencil is connected to the iPad, verify that the Pencil is recognised:
Settings > General > About
Scroll to the bottom of the page - and you should find either one or two specific entries for the Pencil. Finding these entries suggests that the Pencil electronics are good - otherwise, you may have a totally dead pencil.
Check the Battery Widget for the charge status of the Pencil. Is it 100%? If not, let the Pencil charge; if it is fully charged - whilst monitoring the Battery Widget, physically disconnect the Pencil from the iPad.
When disconnected from iPad, does the Pencil disappear from the Battery Widget - or it’s indicated state of charge suddenly fall? If either of these are true, then the Pencil battery is likely to be failing or dead.
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. A second generation Pencil should be docked with the iPad whenever it is not being actively used - as doing so will keep the Pencil optimally charged, protecting the battery from damage.
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. 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.
I hope this information proves to be helpful in both diagnosing and resolving the problem.