There could be two possible scenarios, but both can be disabled.
1) Facebook Messenger has a built-in feature called 'Chat heads', which causes chats to use that floating 'bubble' that you can maximize/minimize at will. It's pretty much what made that feature popular and why others are following suit. You can disable that in FB Messenger's Settings (the app itself). Just tap your profile picture and scroll down to the 'Preferences' section. There, just toggle 'Chat Heads' on/off to suit your preference.
2) Because the feature became so popular, Samsung opted for implementing their own version which can be used with pretty much any app. You can also enable/disable this or choose which apps will use it in your phone's Settings, Advanced Features, Smart Pop-up View. There you can select which apps (if any) will notify you using a chat bubble or use the 'normal' notification schemes.