Drawing API?

Hi guys…

Please help me understanding the x an y cordinates. I want to make like a basic square to understand where the lines starts and ends. I know how the code for this look likes, but i dont understand the moveTo() and lineTo() methodes…??

If the moveTo(x,y) starts at some cordinate, where eaxactly does the lineTo starts and end??

Is there some tutorials on this, i have seen a lot on the net, but nothing good explaination or just me being a noob…

Please advice…

Regards Hrbi