If X owns land and enters into a building contract with Y for Y to build a house on it, then the house belongs to X. All Y owns is the right to be paid. In practice no sensible builder builds a whole house before collecting any money. Payment is made at agreed stages of construction.
If X owns land and enters into some sort of joint venture with Y which involves Y building a house and Y builds the house, the house "belongs" to X in the sense that he is the legal owner of both house and land, that is the person with power to convey it to a buyer. However, Y will have some sort of equitable interest in the property (that is both land and house). Precisely what the interest is and how it can be protected depends on the arrangement.
In practice what often happens is that X agrees to sell the land to Y, but completion is delayed until the house is built and a buyer is ready to complete the purchase of the property. On completion X conveys the property to the buyer, but Y joins in to receive his proportion of the sale price.
Whilst in theory possible, what never happens is that X would own the land and Y the house. That could only be achieved by X conveying the space to be occupied by the house to Y and the complications involved in doing that do not bear contemplation.