Carrot on a Stick is an item that is used to control a pigs equipped with a saddle. This item was added in TU14. Whilst riding the pig, it will gradually eat the carrot. Once this happens, you will need to get another carrot, then craft it again using the new carrot and the fishing rod that you should've gotten back and craft the carrot on a stick again.
Firstly you will need a fishing rod (crafted from sticks and string). You will then need a carrot (obtained from zombies as a rare drop, in village farms, and sometimes from the bonus chest). Open up the crafting interface and then craft it.