Possibly the most common approach for dealing with this is to use the ASP.net LoginView control. In your master page/page layout/whatever, simply wrap the markup/controls you wish to display to authenticated/anonymous users in a LoginView control - this will allow you to easily specify who should see what.
Effectively you don't need to do anything 'SharePoint' here - this all works because SharePoint is built on top of ASP.net, and ASP.net knows whether the current user is authenticated or not.
A simplified extract from the MSDN sample at the link above:
<asp:LoginView id="LoginView1" runat="server">
Please log in for personalized information.
Thanks for logging in
<asp:LoginName id="LoginName1" runat="Server"></asp:LoginName>.