Here your y is having two columns and many rows.
Here you are considering y(:,1) in x-axis and y(:,2) in y-axis in the plot.
If you use plot(y,'r'), then two column will plot in y-axis and x-axis will be some random value.
if you want more clear idea in plotting just check this different plots.
y=rand(10,2);
plot(y(:,1),'r');
plot(y(:,2),'r');
plot(y,'r');
x=1:10; % here x-axis assumed from 1 to 10
plot(x,y,'r');
plot(x,y(:,1),'r');
plot(x,y(:,2),'r');