|"...it happens sporadically- no apparant reason. then it is fine,the pc is only a a few months old ...."|
If you have not dropped the laptop and have not spilled liquid on it, then that should not happen at all.
Make sure there are no keys stuck in the depressed position when that happens, especially the cursor keys, and that you don't have your fingers or hand on the touchpad or on the buttons under it, or on the cursor keys.
Some touchpads are very sensitive to moisture and will behave erratically when exposed to it, even stray droplets from a sneeze or a cough. Make sure your fingers are dry when you touch the touchpad.
Some touchpads are even more sensitive to isopropyl (rubbing) alcohol, which is often used in tissues used to clean LCD displays, etc. . Don't use isopropyl alcohol on a touchpad - you may not be able to have it behave correctly until many hours later - been there, done that.
When it behaves erratically and you can't get it to stop doing that ...
Most laptops have a key combo you can press to toggle the touchpad off / on - see you User's or Owner's manual for the model. Toggling it off then on may cure the problem.
Some touchpads on recent laptops are connected to a USB port internally. Rarely, a USB device may conflict with another USB device - I've had that happen when I had a certain USB connected mouse plugged in at the same time as a certain other USB device. If you have something connected to a USB port when the cursor behaves erratically, try unplugging it to see if the problem goes away. However, if it's a flash drive or external drive or memory card reader, or anything that makes the Safely Remove Hardware icon appear, if you can click on anything at all, click on the Safely Remove Hardware icon in your taskbar and STOP accessing the device before you unplug it.
That icon may be hidden - you may need to click on < at the left side of the icons there to reveal it.
If you can't click on anything, shut down Windows, then unplug the USB device(s) before you boot again.
If nothing else works, press the Crtl-Alt-Del keys at the same time, press the Tab key to toggle the choice to Log off, press Enter, press the Tab key to toggle the choice to the button with the circle with a vertical line on it lower right, press Enter to shut down Windows properly.
Press the power button to boot normally.
If it gets so the cursor behaves erratically at all times, that can probably only be a hardware problem with the touchpad itself. Take it to a place that is authourized to do warranty work on HP laptops, before your one year warranty is up.