It can depend on the location you're living in when living in your vehicle and what type of vehicle you're living in.
If you live in a town it may not be legal to live in the vehicle on your own property due to zoning ordinances etc but if you're way out in the countryside or in the woods then you could likely get away with living in your car or Van, Truck etc without any problems.
If it's a travel trailer or motorhome then you could legally live in it way out in the country on your own land and in some small towns you may be able to legally live in it.
Some towns will prohibit living in your vehicle on your land but you might get away with it.