The North Carolina contracts offer a buyer what is know as a Diligence period (typically 3-4 weeks in length) for which they pay the seller a nonrefundable fee; typically in the range of $100 - $500 depending on what is negotiated and the price of the property being purchased. This is know as the diligence fee. During diligence inspections are done, financing secured, titled work started, etc. You can see a complete list of what gets done during diligence on the Offer to Purchase and Contract starting at the bottom of page 3 in the section titled Buyers Due Diligence Process.
During diligence a buyer may walk for any or no reason at all and if they do the diligence fee is all the Sellers get. Typically the earnest money deposit is paid the day diligence is over and this is put into a trust account. not given directly to the Seller. The Earnest money deposit can be tendered up front but there's really no reason to do so. Closing usually takes place within 10-15 days after the diligence expires. If you do buy the property the diligence fee is credited against the purchase price.
You should have had all of this explained to you buy your agent, when you first met them, if they did not do this I would suggest you are working with an inexperienced poorly trained agent. I hope you are working with a buyer broker and not counting on the sellers agent, allowing one agent to work both sides of a transaction is a terrible idea. There's clearly a conflict of interest (even though the state allows it) and the only person who has good representation in dual agent is the agent, the buyer and seller are essentially thrown under the bus and left to fend for themselves as best they can.