PHP is a general-purpose programming language. However in most cases it is used to create websites. And you are probably going to learn it for the same reason.
PHP is a very simple programming language. And that's very good. You don't have to spend years mastering the skill to start creating websites. You'll be able to create your very first PHP website within a day of learning.
There are several other things you should know, at least at a basic level, to create a website, like basics of Linux command line, how to install a software on Linux or deal with its services. However it's not really necessary to do it right away. You could start with renting a simplest PHP web hosting where everything is managed in a browser. Or even find a free one
If you're good at Linux and know how to setup everything you need — that's fine. If not — just pick some free PHP hosting and find out how to upload a
.php file into the root of your website. Also you'll be given some free 3rd-level domain. That's also OK for learning purposes. Let's say your free domain is
samblog.freewebhosting.net. You should learn then how to create a file
index.php and upload it into the root directory of your website, so it could be reachable in web browser via URL
However there's even easier way if you've just started and going to learn the very basics of PHP. You can use any of online PHP sandboxes which allow you to run simple PHP scripts right in your web browser. Just try them out
So pick a way that you're comfortable with and let's begin.
P.S. The very first PHP function you should learn to make your learning easier is
var_dump function. It prints a type and a value (or a whole structure) of whatever is passed as an argument. It helps you to understand what's going on inside of a given entity.