To sign out of your Google account on your device, go to Apps > Settings > Accounts > Google. Clicking on this item will bring you to your Google account settings.
Tap on the Google account you would like to remove to open the “Sync” tab. From here, the next step differs depending on what phone you are using. On older Android OS versions, you will need to hold down the “Menu” button on the bottom left. In newer versions of Android OS, you can tap on the three dots on the top right.
In both cases, there will be a remove account option. Select this, and confirm your action in the pop up screen— after that, you’re done!
Go back into Settings > Accounts, then select your Samsung account. Repeat the same steps to remove your Samsung account from the device.