I am assuming that you mean in your first question that the lowest ASK is $11, so lets assume a book that looks like:
A $11.20 2000
A $11.10 1000
A $11.00 100
A market BUY for 1000 shares, also assuming the above book were normal orders (not all-or-nothing or having other variant tags), would take out the 100 at $11 and then 900 of the second level - if that was an amalgamation of several orders, then in time-priority sequence.
The second question - what happens to a market order if there is not enough depth of book - will depend upon the exchange rules - and they may vary so you should check. The remainder of the order might be cancelled if it is unexecutable. On the other hand, it might sit on the book, and therefore automatically fill any incoming ASK at whatever price that ASK comes in - which might well be quite far away from what was last traded.
An example of the exchange rules governing execution of limit orders is NYSE-ARCA's rule 7.36.