Marketplace security

I am interested in buying something from the marketplace but I am worried if the seller does not send me the item or sends me something fake. Is there any built in dispute function so I do not get scammed? Thanks.