IB sends out their "notice of possible buy-in" at 2:55pm EST. I have received them even when the stock shows huge availability to short, but I was still bought in, because their Short Stock Availability database isn't always accurate.
If they do buy you in, they will do it for the number of shares in the email message, adjusted for any trades you made that day. I.E., if they tell you they might buy you back in for 400 shares, and you shorted another 100 shares that day, then they will actually buy you in for 500 shares.
You can tell if you got bought in later that night (not sure what time) if you check account activitity on their website, it will show a transaction with a "place-holder" price. The actual buy-in will be a market order the following morning at 10 minutes after the open, which will set the actual price you pay. You can immediately re-short if the stock is available, and I have done that without getting subsequently bought in again.
My personal policy is that whenever I get a "notice of possible buy-in" from IB, I cover for that number of shares, adjusted for trades I made that day, before the close. I don't want to take my chances with a market order the next morning, especially if the number of shares to be bought in is large in relation to the liquidity of the stock. And my short positions are part of a pairs strategy that I don't want to become unbalanced.
Also, if you're carrying short positions overnight, you should check IB's Short Stock Availability tool every day on their website to see what the current borrow rate is on the stocks you are short. This rate can change a lot, and IB doesn't itemize their interest charges so it's hard to tell what rate you're paying to borrow the stock. I've seen it range from 0% for major stocks to > 20% for hard-to-borrow ones. You need to factor this into your P/L and make sure your strategy throws off enough profit to cover the interest charges.