Cannoli have a creamy filling, but that's not whipped cream, pastry cream or custard that you're enjoying; it's cheese. And, traditionally, it's fresh sheep's milk ricotta.
Ricotta is a soft, white cheese made from whey (which is a protein that's left over when you process dairy to make other types of cheeses, such as the hard cheese, pecorino). It's low fat and a little grainy -- kind of like a sweeter, smoother type of cottage cheese. However, fun fact: Because it's made from a cheese-making by-product, it's not technically itself a cheese (cheeses are made from milk), although we all refer to it that way. In the U.S., ricotta is most often made from the whey of cow's milk, but a traditional cannolo is filled with sweetened fresh sheep's milk ricotta that's been blended until smooth. The difference, aside from which animal the milk comes from, between ricotta from cow's milk versus that made from sheep's milk comes down to flavor -- cow's milk ricotta is considered to have a milder taste compared to other ricottas.
Because of its soft, liquidy texture, ricotta is strained before it's used in pastry filling.
Ricotta is the filling of choice; but that's only according to tradition.
While it has a somewhat similar flavor profile to ricotta, mascarpone cheese is a thick, high-fat, triple cream cheese with a texture more like butter or custard than the slightly grainy texture of ricotta. It's a soft cheese, like cream cheese or Neufchatel, and made from cow's milk. This Italian cheese is at home in another Italian dessert favorite, tiramisu, but often it's used as a filling for cannoli made in the U.S. instead of whole-milk ricotta. Why? Mostly because of its moisture content, or lack thereof. Because mascarpone is thicker and denser than ricotta, you're less likely to have problems with it -- too much moisture can turn into runny filling and soggy pastry, which is why it's important to drain your ricotta before using it, but even drained your ricotta-based filling may still have too much moisture. Some recipes and bakers prefer to skip the ricotta altogether; or use a ricotta and mascarpone blend, which offers the best of both cheeses -- a flavor similar to that of traditional ricotta with the creaminess of mascarpone.