Sounds like you've got an ergonomic problem (at least when writing.) You need to check out your work station. Here's how it should work, from the mouth of a career paralegal and now professional writer (so I've spent a LOT of time at the keyboard for the past 25 years):
1. When seated at your desktop or laptop, your feet should sit flat on the floor without either pressing your knees UP or dangling loose. Don't cross your legs, rest them on a step stool or tuck them behind the legs of your chair.
2. The monitor should be positioned so that when you look straight ahead, with your head and neck in a normal position, the MIDDLE of the screen should be directly in the center of your vision. That probably means (as it does for most desktop set-ups) that you'll need to raise up your monitor. I have mine sitting on bricks to achieve this. If you have to lower your eyes, you'll also be lowering your chin and causing strain on your shoulder muscles over the course of several hours.
3. Your keyboard should be positioned so that when you sit normally and bend your arms at the elbow, the keys are directly below your fingertips. Again, you'll probably need to raise or lower your keyboard--depending on the table/desk it's on.
If using a laptop, consider buying an external, plug-in keyboard so you can raise the height of the monitor. That's usually the biggest strain on your neck and shoulders.
If you mouse a lot without actually typing (when researching, etc.) move the mouse and pad to your lap instead of holding your arm at an unnatural angle. It takes a little getting used to, but you'll find it really allows you to spend more time at the screen.
Hope that helps and good luck!