Yes, you can! If you are prepared. You need to have a plan and know what you want to say. You should also have at least a basic understanding of the program you are using to create the website in. The ability to create something in a short period of time depends largely on your comfort level with the program you are working with and learning curves and workstyle are different for everyone.
For raw, basic beginners that want to create something in something close to 24 hours, the best bet is a program like Website Tonight hosted by a reputable service-oriented web hosting company. This is a relative no-brainer as so much of the work is done for you and you don't need to know any programming languages to create a professional looking website painlessly and quickly.
OK, now to brass tacks. Is it possible to create a website in 24 hours? Yes. Do I recommend it? No. Your website presents your image to the world and rushing it may not be the best option. The nice thing is that you can always modify, change, and grow your website once you have the basic framework up and running. Having a credible website is a key element in marketing products and services. If you have a small business, a website can be a lifesaver - no need to send out expensive flyers or promotional materials - you can simply point people to your website.
Have fun with it, take the challenge - using the tools mentioned in this article, you can be up and running in no time at all with your own website, even your own online shop.