Format of sklearn.datasets.load_breast_cancer() - MP Neuron Loading Data

Really don’t know about sklearn package.
is that load_breast_cancer() a function?
how data is distinguished as X (set of features) and Y(class label) here?
can’t we use the general method of opening the file and reading it by using open and read functions and then decide X & Y for our data?

Please refer the link to know about available standard toy datasets from sklearn.