In another article you can read how how handle Basic Authentication using LWP::Simple. In normal circumstances when accessing a site that uses Basic Authentication to protect some pages, you'll see a "challenge". On the HTTP level it is a 401 Not Authorized response with a header containing

WWW-Authenticate: Basic realm="insert realm"

Browsers usually show a pop-up window asking for username/password.

There are however sites that do not provide this challenge.