It gets surprisingly complicated. There is no pre-built scroll bar, so you have to make your own. I just happened to make one recently, so I thought I would share a simplified version of it.
This version scrolls the whole layout (with a tall picture on it). You need a top layer that contains the scroll bar, and doesn't scroll with the rest of the layout (set its parallax to 0,0). It automatically adapts to the layout, so if you change screen dimensions and it will snap to the right side of the screen, and position and resize itself.
You can change the speed at which it scrolls by changing the ScrollSpeed instance variable in the ScrollBar sprite. You can also change the ScaleSize to make it appear bigger or smaller if necessary. This version only works with a mouse. Touch adds more complexity - like how do you properly handle multi-touch, do you want to pan around, pinch to zoom, etc...
If you were wanting a scroll bar to scroll an image inside a window on the layout, without scrolling the whole layout, that gets even more complicated. Then you need a whole separate layer for that, then need to mask off the parts to not show...
Hopefully, this will get you started.