A wholesaler is an investor who signs a contract to buy a property from the owner, then passes the deal to you. There are two common ways to pass it on.
In an assignment, the wholesaler hands you their rights under the purchase contract. You step into their place and buy from the owner. The wholesaler's fee is written into the assignment and is paid at closing.
In a double close, there are two sales. The wholesaler buys from the owner, then sells to you. You buy from the wholesaler, not from the owner. Your contract is a separate one.