He was a captain from April 21, 1832 to May 27, 1832, was discharged, and then re-enlisted the next day as a private (until July, when it seems his service ended). Why did this happen?
Long story short, the company he was in command of disbanded. It was a provisional, short-term militia company that had a service duration of thirty days (wound up being a bit longer, but not by much). At the end of the thirty days, most of those men had other obligations to attend to; families, businesses, and life in general.
Lincoln wasn't done, so he re-enlisted in another company that was still active. Since they already had a command structure in place, he was just a private soldier.
He actually re-enlisted and joined up twice as a private. The second time, his unit was disbanded because the officer in charge decided he had more than enough men.