What I do is start by teaching the command "stand." I use it every time I am asking them to stand still, tied, in the cross ties, with the farrier, and any time else I want them to not walk off. After I can see a reaction to the word, usually I look for them to prick an ear to me and relax, but you will have to read your horse, I will take them to places that they already know to stand still, but not tie them, like the cross tie area, give the command and then go about my normal routine. If they start to wander, I bring them back to where I had them, give the command again and resume my actions. Depending on the horse, I may exaggerate dropping the lead rope to the ground while I give the command. Once they have that part down, I will pick spots at random to ground tie them, always in a fenced off area. I walk to where I want to stop, show them the lead and drop it on the ground as I say "stand."
Using this progression, I had a yearling filly that I could stand up in the barn yard and she would stay in one place for up to 45 min just watching me while I did little odd jobs around the barn.