That really falls under the "personal preference" category. It really depends on your usage and budget. But first, a little helpful terminology. Travel trailers, popup trailers, 5th wheel trailers, cab over campers and Class A, B and C motorhomes are all considered RVs (Recreational Vehicles)
Trailers tend to cost a lot less than motorhomes, because they don't have drive trains. There's no engine to service, or smog and registration fees are usually a lot less than motorhomes. You will, however, need a suitable vehicle to tow a trailer, and a lot of first time RVers have made the expensive mistake of buying an inadequate tow vehicle. Don't trust RV sales people to steer you in the right direction. Come here for those answers.
When you get to your destination with a trailer, you can unhook and have a driveable vehicle to go places. If you're in a motorhome, you'll either have to break camp and drive the motorhome where you want to go, or tow/haul another vehicle. The larger the motorhome, the more impractical it is to make a grocery run with it.
Motorhomes usually setup faster than trailers, especially motorhomes with hydraulic jacks, because all you've got to do is push a few buttons to lower the jacks and deploy the slides. Levelling a trailer can be a bit more involved and cumbersome.
Another nice thing about motorhomes is, if your passengers need to go to the bathroom, or get to the fridge while traveling, they can do so while you're cruising down the road. Not so with a trailer. Just food for thought.
Kev