Ironbelle, here are a couple of thoughts on your topic. Anyone over the age of 18 can play the lottery. That includes residents of another state, a resident of another country, for that matter even those who are in the country illegally can play, win and be paid. There are numerous tax issues, but that is for another discussion that is fact underway on another thread.
The central element in playing another state’s lottery is the actual purchasing of the ticket. In a very simplistic overview, you have to purchase a ticket in a given state to be within the law. Lottery tickets cannot be mailed across state lines. That is against federal law. Also the state cannot legally sell you their tickets over the internet.
Regarding your question “how do people get away with playing in a different state”, well there are a few ways. As noted on an earlier post, if you live close to a neighboring state that offers a different game, (you live in Delaware and which offers Powerball while Maryland is just a few miles away and offers Mega Millions) you take the drive to the neighboring state and buy your ticket. If you are in a situation where that is not a workable alternative, you could use one of the web sites that offer a service for people to purchase lottery tickets. Prior to using these services it is up to you to feel comfortable with the web site and how they operate. Of topical interest are the Internet gambling restrictions that have been added to a bill in Congress and how these restrictions will play out for the services that offer lottery via the Internet. It seems that it is the goal of our lawmakers to ban Internet gambling. I would imagine that lottery tickets are considered a form of gambling as far as the Internet is considered.
Hope this helps answer your questions.