If you want to disable messages (texts, messages, iMessages) on your Mac (but leave them going on your phone, etc) you can turn that feature off. Just follow these steps...
Open the Messages app on your Mac. Choose Settings (Preferences on older systems) from the Messages menu. Click on the iMessage tab. Where you see your Apple ID information, click on "Sign Out". Close the Settings window and quit Messages.
Other iCloud services should continue but messages won't be received on the Mac.