Here you must use it. I can't explain you it so easily, so maybe is better if you read
this. Is something very important to know; I'm sure another user will explain you correctly.
About the topic, here we directly say:
"compré la loteria", we almost don't use "boleto" or "billete" or "talón"(this is common too).
"Me compré la loteria."
But it isn't a good example for someone that is learning Spanish.
__________________
Please, don't hesitate to correct my English.
'Time is a sort of river of passing events, and strong is its current; no sooner is a thing brought to sight than it is swept by and another takes its place, and this too will be swept away.' M.A.