What exactly is .csv in machine learning?
A csv file is a way to store an array (similar to an excel table). 
With a code like this one, you can save a pandas dataframe to a csv file: 

 import pandas as pd
 df = pd.DataFrame({'c1':[1, 2, 3, 4], 'c2':['a', 'b', 'c', 'd']})
 df.to_csv('df.csv')


which will look like that 

,c1,c2
0,1,a
1,2,b
2,3,c
3,4,d