If your changes are not yet staged or committed and your local master branch is already up to date, you can simply create a new branch.
git checkout -b newbranch
If you need to sync with the upstream master first, there is a chance that your commits will conflict with the upstream changes. First, simply try
git pull origin master
(or upstream instead of origin if that's what you are using). If you don't get any warnings, your master is now up to date. If you do get a warning, git will refuse to pull, and you need to make arrangements to reconcile the differences between the origin/upstream and your uncommitted changes. As a first step, stash your changes, then proceed;
git stash save -m "put a useful comment so you know what this is"
git pull origin master
git checkout -b newbranch
git stash pop
There will probably be some conflicts to sort out at this point, before you proceed and commit.
Though often it will feel safer to just create a new local branch and commit what you have, then switch back to master and see what needs to be done to sort out any conflicts with upstream.