The answers depend on your particular city, State, and local government ordinances. Usually you need a retail license. Sometimes it`s called a sales tax license. Or a reseller`s permit.
In Indiana (where I live), you`d need to contact the Indiana (State) Department of Revenue to find the regulations that apply to your business. There will be some similar agency where you live.
For the ice cream business you might need to check out the rules from your local health department.
And if the stuff you`re selling from home is purchased by customers who come to your location, you`ll have to concern yourself with local zoning laws, too.