If you've signed into your Mac with the same Apple ID that you use on your phone, then by default your iMessages and text messages will come through as notifications and also will be available in the Messages app.
1. Open the "Messages" app
2. Navigate to the "iMessage" pane:
Uncheck the box where you see "Enable Messages in iCloud"
3. Next you'll want to open the "Notifications" panel in system preferences and scroll down then select "Messages" on the left:
4. Click the slider next to "Allow Notifications" to turn them off for the app.