Some hosting companies provide a free service, but you should treat this with a high level of caution. Such services are very limited, are usually not very secure, and if something goes wrong, the company probably won't make much effort to help you. For those reasons, you'd be much better off signing up with a cheap hosting provider, which can costs as little as a couple of dollars a month.
The only scenario when it might be worth using free hosting is if you just want to experiment with building a website, and don't necessarily want anyone to visit it. In which case, we'd recommend Infinityfree, which provides a fairly decent service and no hidden fees. Alternatively, if you just want a free place to share your portfolio online, see our roundup of the best free portfolio hosting options.