It's not clear what question you're asking.
Infected cases being people already in hospital ?
Infected people who are at home (self isolating/quarantined) ?
Infected people who don't know they are infected ?
If a lockdown is in place then as others have stated, you simply aren't allowed to leave your home (house, apartment, shack, boat, caravan, tent?)
If you use the Wuhan example, you don't get to go shopping or anything. Processes are put in place for how that is done (either by the government or through some devolved mechanism at a street level organised by the government) where there is a system of creating a shopping list and a roster of people who do the shopping and so on. Not saying that's the case here but providing it as an example of how a lockdown works in a known case.