Lets say I buy Photoshop in the middle of the month do i have to pay for the whole rest of the month or the thirty days once i pay for it
A subscription is a yearly contract you have something like a 14Day window where you can cancel your subscription without any early termination fee. After that 14Days there is an early termination fee something like 40% of the remainder of the un-paid payments so something under $48
Adding to what JJ said, you basically pre-pay for the whole month. There is no real "canceling" since it's already been paid for. Think of it as you would like Netflix.
Unless something's changed, you can pay for Photoshop CC for just a month, but it's much more expensive that way. (Think it was like $30 for a month.)
I just checked my renewal and it comes up on the 13th of the month that it is due, so to answer your question, a month is not now to the end of February. It's the 18th or the 19th for 30-ish days.