Market price is just the bid or offer price of the last sell or buy order in the market. The price that you actually receive or pay will be the price that the person buying the stock off you or selling it to you will accept. If there are no other participants in the market to make up the other side of your order (i.e. to buy off you if you are selling or to sell to you if you are buying) the exchange pays large banks to be "market makers"; they fulfil your order using stocks that they don't want to either buy or sell just so that you get your order filled.
When you place an order outside of market hours the order is kept on the broker's order books until the market reopens and then, at market opening time there is an opening "auction" at which orders are matched to opposing orders (i.e. each buy order will be matched with a sell) at a price determined by auction. You will not know what price the order was filled at until it has been filled.
If you want to guarantee a price you can do so by placing a limit order that says not to pay more than a certain price for any unit of the stock.