1. Potted Stem Plants
Stem plants, such as Ludwigia or Rotala, simply cut the stems off where the Rockwool begins, and plant them. You may also try to remove as much of the Rockwool if you would prefer to keep some of the plant's roots if you are worried the conditions in your tank might not be the best, to give your plant a better chance of adapting to its new environment.
2. Potted Bulb or Rhizome Plants
With bulb or rhizome plants, such as Java Fern or Anubias Nana, remove as much Rockwool as you can without damaging the roots (doing so when under running water can make it a bit easier). Then you want to trim all but about 1/2-1 inch of the roots, rinsing the remaining Rockwool from the roots afterward. This is then ready for planting, don't worry if you can't remove all of the Rockwool, it's inert and won't harm anything in your substrate or aquarium!
3. Potted Carpeting Plants
Lastly, if you have carpeting plants such as Monte Carlo or Dwarf Baby Tears that have a very delicate root structure. For these, trim the Rockwool to about 1/2-3/4 inch, then cut the plant into smaller clumps. Plant these straight into your substrate, this will help your carpet spread quicker and healthier.