How do Anti-Aliasing Filters filter the signal? I have programmed a anti-aliasing filter that uses the fourier-transformation and makes a perfect cutoff on my desired cutoff frequency for downsampling without aliasing. 
I have read about other types of filters for anti-aliasing. Here i have a nice picture of different filters from this site:



The dotted line seems for me the perfect or ideal filter, but in practical it is not possible to filter a signal perfectly right? And therefore we can use different filters with different orders. 
Does this graph mean, the different filters do not filter completely on the perfect cutoff frequency and always contains a little aliasing?

The programmed FFT-Filter is used as followed in python:

    def lowpass(x, binmax):
        N = len(x)
        return np.fft.irfft(np.fft.rfft(x, axis=0)[:binmax], N, axis=0)

x48hr is a Signal sampled with 48kHz and do a cutoff at 4kHz
lr_signal = lowpass(x48hr, binmax=len(x48hr)*4//48) #hr 


I use this filter for generating low-resolution samples to train an convolutional neuronal network to learn the mapping between lr and hr to make a hr signal reconstruction.

In general I am actually trying to understand how much aliasing my measurements have and how I can use my measurements to study different types of filters and the aliasing in them. I want to increase the resolution of my signal, therefore I need aliasing in my low-resolution signals. I have asked another question regarding my problem here if you want to know more about it.
Yes that is correct. The width of the transition band is inversely proportional to the length (or memory) of the filter which means to say that you would need an infinite amount of time to achieve your perfect filter. Therefore for practical reasons you decide how much aliasing would be tolerable (similar in many ways to deciding how many decimal places you need to include for a number describing the length of something) and then design your filter accordingly. The tighter the rejection the longer will be the filter delay and higher will be the overall complexity.