How Websites Keep You Logged In

How do websites securely communicate with servers and remember who I am after I log in?