There are a few different ways to pitch a tarp. In all cases the challenge, compared to a tent which is full self supporting, is that you need to find enough anchor points to be able to pitch it with adequate tension. In fact often the exact configuration you use will be determined by what points you can find to string it up from.
A common method is to string a cord between two trees. This requires one of the knots to allow you to adjust the tension in the cord after it is tied as in this video
This line form the ridge of the tarp which is slung over it and then itself tensioned with short cords fixed to the ridge line with a prusik hitch or similar.
Then the four corners are tensioned with guy lines to ground level fixed to pegs, rocks or other trees.
The most important thing about setting it up properly is to be able to tie the proper knots easily, which comes with practice. This is what allows you to tension it properly so that it sheds water effectively and is able to resist the wind.
Tarps are most useful in forested or jungle areas where you can be sure that there will be plenty of trees to tie all the lines to and they are often used in conjunction with hammocks as in this type of terrain it is often difficult to find smooth level ground to pitch tent on and it is possible to set up a hammock and tarp camp on extremely rough and sloping ground where a tent would be impractical.
On particular advantage compared to a tent is that it is quite versatile for example it can be set up quite high and wide to provide a shelter for cooking, drying clothes or other admin during the day and then lowered to give a more enclosed space at night. Similarly, with practice and in the right terrain they can be set up and taken down quickly enough to be used for rest break in bad weather.
It is also possible to use a tarp as the basis of an improvised tent using poles carried with you or found locally. This can be a useful stop gap if there are no trees etc around but can be an awkward compromise between a proper tent and the bets use of a tarp and if you want an ultralight system you may be better off with a bivi bag, but this very much depends on the precise circumstances you are expecting.