First of all, know that there is no ONE best way to curl. There are a few factors here to be aware of.
Standing vs. seated
When you curl standing up, it's very important that you try to keep your upper body as static as possible. It's easy to help out with your entire body by swinging the bar, taking focus away from the biceps.
This is, however, its own exercise, called cheat curls. The point of this is to get the bar up with assistance, and then focus on lowering it as slowly as possible. This is a very good exercise in its own right, and can be used to overload the biceps with heavier weights.
When seated, with your elbows on a sloped pad like in your second picture, this is called a preacher curl. Here, cheating is impossible as your elbows are static, and you put more focus on the biceps.
Straight bar vs. EZ-bar
The bar the lady is using is called an EZ-bar, and are especially made for curling. The straight bar puts a lot of tension on your wrists as you come up, but the EZ-bar takes this away because your wrist is turned slightly inward.
Which one of these you want to use is up to you, but your first priority should be to see if the straight bar causes pain in your wrists. If they do, use the EZ-bar instead.
The upside of the straight bar is that your grip will be more supine, and a supine grip better facilitates building the peak of the bicep.
For more info on this, check out this YouTube video.
Do all the variations. Don't stick to just one of them, because your biceps will just adapt to that particular motion, and hinder progress. There are a LOT of variation out there, both with a bar, and with dumbbells, and you should do as many of them as possible in order to get the best progress.