While gambling is legal under U.S. federal law, there are significant restrictions pertaining to interstate and online gambling, as each state is free to regulate or prohibit the practice within its borders.