To ‘top and tail’ is an expression that in cooking means to trim both ends off of something.
For instance, you would top and tail green beans, or runner beans. You top and tail carrots. You top and tail green (or spring) onions by trimming off the roots, then trimming any brown bits off the top of the stalks.