Not sure how much you understand Redux yet but you create actions for each task you want to record in the store, these are processed using reducers.
The createAction function, as it's name suggests creates actions, so rather than having to re-write the same code over and over you can call it, passing the name of the action you want to create. In this example the action being created is called SET_USER_ID
The arrow function =>
is new syntax introduced with the latest javascript which is known as ES6. You can read about it here. Arrow functions allow you to define functions using shorter syntax and they also solve scoping issues.
The final line would be used within your react component to call the action. i.e.
<Button onClick={ () => dispatch(setUserId('abcd123')) } />
It took me a while to get my head around redux, if you haven't watched Dan Abramov's tutorials on it then I highly recommend them. He's the creator of redux. Also start building your own redux app, that's the best way to learn.