How does a Lightning transaction work if one party starts with no Bitcoin and no wallet? Let's say Alice wants to give Bob 1₿, and Bob doesn't have a regular blockchain wallet address yet.

The classic example assumes that Bob is locking some Bitcoin of his own on the blockchain, and Alice and Bob are both funding a channel between each other.  But what if Bob doesn't have any Bitcoin yet, and Alice wants to give him some via Lightning?  Then he could get the Bitcoin from Alice, do transactions with it with other parties in the Lightning Network, and only do a slow expensive blockchain transaction when he's ready to cash out.

I know it's possible because I've been able to test this out with two different Lightning apps with separate wallets.  I funded one Lightning Wallet, and opened another app with 0 balance and no regular wallet.  I was able to fund the second wallet instantly.  But I'm not sure what's going on to make it happen.
The classic example assumes that Bob is locking some Bitcoin of his own on the blockchain, and Alice and Bob are both funding a channel between each other.


This is not how lightning currently works! Currently only one side is funding the channel. People are working for a dual funding solution in which two parties fund the channel in a way how you suggested it. So if Bob does not have any Bitcoin alice could fund the channel and then send btc to Bob. (which should also be the answer to your question)