Chamfer

When do i type in the distance command right away and when do i put in polyline command before i put in the distance command?

If its a polyline as you enter the command type in p for polyline

how do I know if its a polyline?

If you select an object of multiple segments and they are joined together with the middle rectangle grips it is a polyline