pickpocketing assuming you didn't find out until after it was done is in most cases considered larceny from the person. it holds a slightly larger penalty than larceny but less than robber because there was no fear or intimidation by your part at the time it was removed from your person.
It is theft and that is illegal.

