Is your dog aggressive? What you should do
If your dog is already used to a crate, you can use it as part of your plan to manage where he is. If he is not accustomed to a crate, you can try teaching him to use it, by enticing him in with food or dog toys, but be sure that he is okay in it before you leave him alone. Even then, devise a way to check on how he is doing, such as looking in a window. Don't just dump him in the thing for hours on end, or he may injure himself or do damage to the crate. You can't leave him in it for many hours.
If you don't have a crate or as an adjunct to it, you may be able to confine the dog to a room in your home, such as a laundry room, a spare room, or something of the sort. If you are dealing with dog-dog aggression, be sure that at least one door, and preferably two, is between the two dogs all the time.
The second step is to have a good veterinary exam for your dog. It may be that your dog is in pain or has some other physical condition that led to his bad temper. If so, once you get it solved, the aggressiveness itself may cease. If your veterinarian finds nothing, then you know that anyway.
Third, begin writing down short notes about the aggressive incident and what has happened since. Use a little notepad or some paper that you can keep in a convenient place, so it's easy to make these notes. If you try to go back after a few days to reconstruct what happened, you may find that your memory is a bit unreliable about the timing and other details. This is normal, and all the more so when a situation is stressful. But these scribbles will have a place as you begin to create some new habits for training the dog and managing the situation.
Longer-term planning is the next step, or actually several steps. It may not be easy, but there have been studies done which show that when people who have an aggressive dog are diligent about care and training, the future is much rosier for the dog and all around him.