PHP uses sessions and cookies to introduce state into the stateless HTTP protocol. Sessions allow servers to remember stateful information about individual users from page request to page request, while cookies store small amounts of data on the client side. The setcookie() function and $_COOKIE superglobal array are used to create and access cookies, while sessions are managed through the $_SESSION superglobal array after starting a session with session_start(). Cookies and sessions both provide methods for persistence across multiple page loads or visits.