The tart filling is a simple vanilla custard, known as manjar blanco (translated to blancmange).This is made by cooking the milks, sugar and egg yolks.
The port meringue is essentially an Italian style meringue where the egg whites are set by a sugar syrup. Instead of water, use port to give a purple shade and add flavour.