A compatible Apple Pencil can be used with multiple iPads - however, it can only be paired and used with a single a iPad at any one time. To use the Pencil with a different iPad, it is simply paired again with the iPad with which you intend to use the Pencil.
Pair Apple Pencil with your iPad - Apple Support
Here is Apple’s definitive compatibility list for Apple Pencil and iPad:
Apple Pencil compatibility - Apple Support
The first and second generation Pencil use an entirely different pairing and charging interface.
The second generation Pencil can only be used with iPad models that have the magnetic/inductive dock that is exclusively designed for the Pencil. Charging is controlled via the iPad magnetic dock.
The first generation Apple Pencil uses the physical Lightning port of the Pencil and host iPad for both pairing and charging the first generation Pencil. The first generation Pencil can also be charged using an inline charging adapter and the iPad’s Power Adapter. This pencil can only be used with compatible iPad models that have a Lightning connector; with the sole exception of the new iPad10, requiring a special adapter, iPad models that feature a USB-C port lack any means by which to pair with a first generation Pencil.
Apple Pencil models are not interchangeable - and can only be used with the iPad that has appropriate internal hardware. If both of your iPads support the first generation Pencil, you can use a single Pencil with both - remembering that you must repeat the simple pairing process before it can be used with the other iPad. If one iPad supports the second generation Pencil - then you'll need both a first and second generation Pencil, one for each iPad.