The source of your pain is bad posture, which is almost inevitable when you work on a laptop. The laptop is placed too low relative to your head, so you have to tilt your head forward, which places strain on your neck.
At the same time, the table you're sitting at is too high, and the chair too low, so your arms are not supported properly, adding more strain.
This is why people who need to work on their laptop all day long often create an ergonomically correct workplace by connecting the laptop to an external monitor, keyboard and mouse. This allows you to maintain correct posture: spine and neck straight and relaxed, looking ahead instead of down.
If you insist on using the laptop by itself, take frequent breaks. For at least 5 minutes every hour, stand up, stretch, get your blood flowing. Move all those muscles that have been stationary for the past hour.
If you find yourself leaning forward because you can't read the laptop screen, see an optician and have your eyes checked: if your eyesight is not optimal, you start straining your eyes and or leaning forward, which again increases the strain on your body.
Also, many laptops today have high-resolution screens which the OS does not compensate for automatically, so all text on the screen is tiny. You may have to adjust settings.
Cafes often have terrible chairs, which make the problem worse: insufficient padding produces pressure points, and you start straining your body to try and compensate.
There's no way to 'remove the pain as quickly as possible'. You're damaging your body, and the pain is the body's method of telling you something's wrong. The body needs time to recover (and to recover from sitting still, you need movement). If you keep using your body in a way that causes pain, that pain may become permanent. This happened to me: wrong posture and not enough exercise led to permanent wrist pain, which took months of physical therapy and changes in lifestyle to recover from.