Yes and no. In single player, if you press ESC, there is an option in the lower right corner that says "Save and Exit."
In Multiplayer (I'm assuming you're using Hamachi and Terraria Server) If you are not the host, all you have to do is disconnect and it will automatically save (what you have ON your character. If you are the host, you must open up Terraria server and type in "exit". Typing this in will close the server (thus closing the game, even to you), save the game and disconnect all of the players from the game. The game does auto save (multiplayer) every once in a while for the objects in the WORLD, NOT ON THE CHARACTER.
To wrap it up:
-
Open Terratia Server
-
Type Exit in the program itself.