You better start with the examples, it sounds like you just started with THREE.
Basically you need a spatial managed scene, speaking of octrees to track down your objects very fast, a simple way would be to use a raycaster against the scene, but this means all your checking has to be done against all objects. If your world is small, it might be ok for you without extra management.
To place the object (the position first) you can use a raycaster, feeding a list of your ground objects (a plane for example), at the resulting position you can use for a simple check the bounding box of the object’s geometry you want to place, and test it with the surrounding ones around the raycast position (this requires to apply the matrix of each, but there is a simple library for basic shape collisions too). With a spatial manager you can minimize the number of computations massively here - but it depends on your usecase, if you want to build a big city you definetly need management here, if you don’t need thousands of objects you can leave that point out, just to mention it.