-
You can do this on one way tickets that have a stopover, since people miss their flights all the time.
If you do this on a roundtrip ticket, the airline will cancel your remaining flights.
I have done it many times before but if there is an issue like your flight gets changed and they reroute you, then you will be kind of screwed.
Also on skiplagged tickets, you typically can’t check bags.
I had one ticket ORD-AMS-BCN and I was going to get off in AMS, and KLM made me check my carry on or I couldn’t fly.
Skiplagging isn’t illegal though, meaning you can’t arrested for it, but the airline can get mad if you do it too much.