There are programs available. I prefer a more manual way. If you enable disk use on the computer you usually sync with it should show up in file explorer (Windows) as a removable disk.
Then, you need to allow the explorer to show hidden files and folders. This should reveal a folder called "iPod_Control" - in that folder is another folder called 'Music', this contain your music. Just back it up and import it onto your Mac.