To ping a website or IP address, open the command prompt (Windows) or terminal (macOS/Linux) and type "ping" followed by the website URL or IP address. Press enter, and you'll receive information about the round-trip time and packet loss, if any.