How can I use WordPress from localhost?

Hi Techyv experts,
I want to install WordPress on my pc. How can I create database connections? I want to build my site and host it on local host. How can I make my own WordPress theme?
Please let me know what is the process is.
Thanks
