If the child is 12 and under they must be seated in the back seat by law if there is a back seat to the vehicle.
If you're in a vehicle such as a truck with only a front seat then obviously the child can sit in the front seat as long as they are properly restrained and in a booster seat or child restraint if required.
Make sure the airbag is shut off as well if you have one because an airbag can kill a child 12 and under.
In some states the child if 12 and under must ride in the backseat by law and if they are in the front seat and you get pulled over you could get a ticket which can vary from state to state.
Always have the child that is 12 and under ride in the back seat of the vehicle for both legal reasons and for their safety.